ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.97k stars 3.41k forks source link

group_vars and host_vars ignored when placed inside inventory folder (as per Ansible documentation) #15438

Open hagaram opened 1 month ago

hagaram commented 1 month ago

Please confirm the following

Bug Summary

When I create a job template, using some static inventory from repository (inventory --> add --> sync from source control), which is the same repository where also playbooks and group_vars/host_reside... the vars are ignored when the folders are placed inside invetory folder... unless I move them to playbooks folder.

I can't even, because my variables are encrypted with Ansible vault, but I'm unable to select vault secret for inventory sync job. (there asi already like a dozen issues reporting this, so I won't be creating new one for that).

How exactly does AWX work with variables/ Where does it read variables from ? I don't really need to import the variables to awx, as they are already in the repository.

AWX version

24.6.1

Select the relevant components

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

Run some playbook, with group_vars and host_vars being folders being inside the directory, where the static inventory is stored.

After moving the group_vars and host_vars to playbook directory, they are read properly - but this is something we don't want to do for various reasons.

Expected results

Ansible should read the variables.

Actual results

Ansible ignores the variables.

Additional information

No response

hagaram commented 1 week ago

Anyone?