Hi there,
Got an issue with AWX 1.0.6.14 / ansible 2.5.4
First let me explain the directory and ini structure :
inventory/core/core.ini
inventory/core/group_vars/all/all.yml
inventory/core/group_vars/core/core.yml
inventory/core/group_vars/dns/dns.yml
inventory/core/host_vars/dns1
inventory/core/host_vars/dns2
inventory/dc01/dc01.ini
inventory/dc01/group_vars/dc01/dc01.yml
inventory/dynamic/dynamic.sh
The content of core.ini is to define hosts into groups that must be deployed to different locations (dc01, dc02…)
[core:children]
dns
[dns]
dns1
dns2
dc01.ini creates a mapping of core hosts to the defined dc01 group and a declaration of an empty group that is filled by the dynamic inventory script (not declaring it throws an error) :
[dc01:children]
core
products
[products]
#(empty)
Last is a dynamic inventory script that outputs a json like :
{"_meta": {"hostvars": {"product01": {"ansible_host": "10.0.1.181"}, "product02": {"ansible_host": "10.0.1.182"}}}, "products": {"hosts": ["product01", "product02"]}}
When running ansible-playbook -i inventory/core/core.ini -i inventory/dc01/dc01.ini -i inventory/dynamic/dynamic.sh playbook/playbook.yml
from the command line, we get the expected result : ansible has computed the inventories and produced a merged one with the correct hierarchy and group_vars mapping
But when running the same on AWX, the dc01 group_vars are not parsed/available to the products
hosts
We created an inventory on AWX with the ini files and dynamic.sh (all from SCM).
I’ve seen many issues on both github/awx and github/ansible but need help to leverage the issue the time the fixes will show up.
Most of them are closed but I don’t which one(s) our issue applies as we match most of the use cases !
- Inventory group vars are not loaded
- Target multiple inventories for a job template
- Stop forcing overwrite_vars=True for SCM inventory sources
- SCM group_vars not added to non-SCM additional hosts
- Empty groups ignored when sourcing from projects
- New ansible-inventory option to return variables at group level
- Empty groups from vars plugins inconsistently shown
Any help or indications welcome
Best regards,