Ansible - Dict (Map)

Card Puncher Data Processing

About

value type of a variable

The map variable in ansible is based on the python dict.

Default

{{ mydict|default({}) }}

Management

Set

See Yaml - Mapping (Map)

Get

map[key] 

example:

domains:
   example.com:
      - sub.example.com 
domains['example.com'] 

Loop

- name: Loop a dict
  debug:
    msg: "{{item.key}}: {{item.value}}"
  with_dict: "{{ letsencrypt_domain }}"





Discover More
Card Puncher Data Processing
Ansible - Map Data Structure

see
Card Puncher Data Processing
Playbook Variable

This article is variable inside a playbook, task, ... Single value Boolean Block of text Order...



Share this page:
Follow us:
Task Runner