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
14.08k
stars
3.43k
forks
source link
Expand COLLECTIONS_PATHS for repos that are a valid collection #14174
[X] I understand that AWX is open source software provided for free and that I might not receive a timely response.
Feature type
New Feature
Feature Summary
When a repo (referenced by an AWX project) is itself a collection, it should be possible to reference e.g. its contained playbooks by fqcn (docs) instead of (relative) path, in import_playbook, and also in the Job Template Add/Edit GUI. The same is probably true for roles (and much more common).
This currently does not work, because the project directory is not added to the ansible config value COLLECTIONS_PATHS.
Select the relevant components
[X] UI
[ ] API
[ ] Docs
[ ] Collection
[ ] CLI
[ ] Other
Steps to reproduce
Create a collection example.test
Create two playbooks in a directory playbooks/:
# one.yml
- import_playbook: example.test.two
and two.yml
Commit the (collection directory) to git, so that there is /path/to/ansible_collections/example/test/.git/
Add the repo as a Project in AWX
Try to create a JT from that Project with Playbook = example.test.one
Create & Launch a JT from that Project with Playbook = playbooks/one.yml
Current results
Cannot create a JT with a FQCN, only a path
import_playbook cannot find two.yml by FQCN
Sugested feature result
I propose to add the project directory to the ansible config value COLLECTIONS_PATHS
when a project is recognized to be a collection, e.g. when containing a galaxy.yml at the toplevel (with yaml keys matching the expected schema).
The part "When a repo (referenced by an AWX project) is itself a collection, it should be possible to reference e.g. its contained playbooks by fqcn [...] in the Job Template Add/Edit GUI" is #14124
Please confirm the following
Feature type
New Feature
Feature Summary
When a repo (referenced by an AWX project) is itself a collection, it should be possible to reference e.g. its contained playbooks by fqcn (docs) instead of (relative) path, in
import_playbook
, and also in the Job Template Add/Edit GUI. The same is probably true for roles (and much more common). This currently does not work, because the project directory is not added to the ansible config value COLLECTIONS_PATHS.Select the relevant components
Steps to reproduce
example.test
playbooks/
:and
two.yml
Current results
Sugested feature result
I propose to add the project directory to the ansible config value COLLECTIONS_PATHS when a project is recognized to be a collection, e.g. when containing a galaxy.yml at the toplevel (with yaml keys matching the expected schema).
Additional information
Maybe split the GUI issue about JT.playbook ?