Hi
I'm trying to change the order in which our group_vars are loaded with ansible_group_priority but it's not working.
I have a role at roles/mytest/tasks/main.yaml like this:
_______________
- debug: var="myvar"
_______________
Then I have two group_vars files, one called inventory/group_vars/cluster_1.yaml with this values:
________________
ansible_group_priority: 10
myvar: cluster
________________
And another one called inventory/group_vars/role_1.yaml with this value:
________________
myvar: role
________________
Finally I have a playbook called mytest.yaml like this:
________________
- hosts: role_1&cluster_1
roles:
- mytest
________________
I think I'm reproducing exactly the example at
https://docs.ansible.com/ansible/devel/user_guide/intro_inventory.html#how-variables-are-merged but the result is always "myvar: role". And of course, when I comment that line at role_1.yaml, the result is "myvar: cluster".
I've tried setting ansible_group_priority at role_1.yaml to 9 (and to 11, just in case), but it still happens the same. Well I think at this point I've tried all combinations :D
I'm using ansible version 2.4.0.0 but I also tried with 2.4.2.0 with the same results.
Can anyone spot anything that I'm doing wrong or did I just hit a bug?