June 2017
Intermediate to advanced
446 pages
10h 10m
English
Looping over a simple list is nice. However, we often have an entity with more than one attributes associate with it. If you think of the vlan example in the last section, each vlan would have several unique attributes to it, such as vlan description, the IP address, and possibly others. Often times, we can use a dictionary to represent the entity to incorporate multiple attributes to it.
Let's expand on the vlan example in the last section for a dictionary example in chapter5_6.yml. We defined the dictionary values for three vlans, each has a nested dictionary for description and the IP address:
<skip> vars: cli: host: "{{ ansible_host }}" username: "{{ username }}" password: "{{ password }}" transport: cli vlans: ...Read now
Unlock full access