Hello,
I do many tests and I don't understand the group_vars load order in ansible
2. With ansible 1 vars are load in my playbook order. But with ansible 2 it
seems to be totally random.
For example:
I have 2 groups:
group_vars# tree
├── all.yml
├── site_plo.yml
toto: foo
└── machine_ehp.yml
toto: bar
I place my machine in thats groups with this playbook :
- name: Dynamically define site
group_by: "key=site_{{ inventory_hostname_short[0:3] }}"
- name: Dynamically define environment
group_by: "key=machine_{{ inventory_hostname_short[3:6] }}"
- debug: var=toto
In this configuration toto=foo
When I rename machine_eh1 there is no logic :
amachine_eh1: toto=bar
bmachine_eh1: toto=bar
cmachine_eh1: toto=bar
dmachine_eh1: toto=foo
emachine_eh1: toto=bar
zmachine_eh1: toto=foo
There is a bug ? a specific order rule ? a random rule ?
Thanks for your help
--
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/1c02c5df-631e-45ea-8f7e-f44d03637853%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.