Currently have a playbook that is creating template configs for our cisco 
switches. Most generic variables are kept in group_vars and we're currently 
using individual host_var file per switch to store variables unique to each sw 
e.g hostname, IP address etc.. 
Our host_var structure is as follows:
 host_vars/tor01.a01
host_vars/tor02.a01

Within the INI inventory we reference each switch as follows:
[cisco_tor]
tor01.a01
tor02.a01


Is it possible to create a single file instead in host_vars that contains a 
dict of all switches and access those variables in ansible play instead? 
host_vars/tor_switches

Similiar to example looping over hashes given on Ansible documentaion? 
Ive tried to do this by including with_dict: tor_switches in playbook but it 
errors during play run with "with_dict must contain dict"

 Should this be referenced in role/task/main.yml instead? 

Amanda

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7e17d9ba-16d0-4234-8168-c0b3102e1fb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to