I use roles and testXX/group_vars/all to define a great many things for each environments.
I have to build xml files that contain two values at least in each iteration. The example below has pool1 and pool2, and within those pools we have server1, server2 etc.
I can’t get my head around how to template this, and how to define arrays in group_vars to work with the templates and/or playbook. I hope this makes sense.
pool1 server1 hostname1 /path/to/somewhere server3 hostname2 /path/to/somewhere pool2 server2 hostname3 /path/to/somewhere server2 hostname4 /path/to/somewhereI would like my all file to be something like
pools:
- pool1
- server1, hostname1
- server3, hostname2
- pool2
- server2, hostname3
etc