I tried, but it's not working either. I just made a mini-version of our
inventory script, adding the ansible_group_priority:
____________________
#!/bin/bash
cat << EOF
{
"cluster_1": {
"hosts": [
"host1"
],
"ansible_group_priority": 10
},
"role_1": {
"hosts": [
"host1",
"host2",
"host3",
],
"ansible_group_priority": 1
}
}
EOF
_____________________
And when running my playbook I get:
_____________________
TASK [mytest : debug] *********************************************************
ok: [host1] => {
"myvar": "role"
}
_____________________
Just as a refresher, the contents of the playbook are:
_____________________
- hosts: role_1:&cluster_1
roles:
- { role: mytest, tags: mytest }
_____________________
Contents of inventory/group_vars/cluster_1.yaml:
________________
myvar: cluster
________________
And contents of inventory/group_vars/role_1.yaml:
________________
myvar: role
________________
I must be doing something wrong, because being ansible_group_priority higher
for cluster, it should show "cluster", but it shows "role".
I tried setting the number 10between quotes and without them with the same
result. Also tried removing priority from role (default value should be 1) with
the same result.
Any ideas?
--
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/c4896624-e8a0-4da8-b53f-bcc3ef47e56b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.