awx
awx copied to clipboard
Expand COLLECTIONS_PATHS for repos that are a valid collection
Please confirm the following
- [X] I agree to follow this project's code of conduct.
- [X] I have checked the current issues for duplicates.
- [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/
:
and# one.yml - import_playbook: example.test.two
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).
Additional information
Maybe split the GUI issue about JT.playbook ?