Hi everyone,
I was under the impression that when using the magic “groups” variable, the list order would follow the order as specified in the inventory file.
So for example given the following inventory:
[databases]
db1
db2
I expected that ${hostvars.${groups.databases[0]}.ansible_hostname} would expand to ‘db1’.
It now appears to me that might not always be the case.
Can someone give some guidance here as far as what the expected behavior should be?
Is it a list or a set?
Thanks!
- Oren