Open AlanCoding opened 1 year ago
we have had hit or miss on doing this inside the redhat_cop playbooks, as customers seem to think it is the ONLY way to use the collection/roles, but that is more on the feature and customer assumptions, would love for this ability in AWX
This is similar to something I did here, which made the project optional on jt definition: https://github.com/ansible/awx/pull/12250
Which I think may be the right way to go.
If you use a null project, that means the user would manually type in the FQCN for the playbook. That should work, but it is in-congruent with the current user experience which offers a drop-down selection of playbooks.
I've argued that not collecting metadata for EEs is a problem, see https://github.com/ansible/awx/issues/10409
If we collected the EE metadata then we could populated a suggested playbook list after the user selects the JT execution_environment. Normally this is optional (as it falls back to default), but that brings up a good point - that perhaps we should require an explicit EE on the JT to use this feature. Just a thought.
hey! :D that's nice! I would love to have this feature. I was talking to @relrod and I already this problem.
+1 for this feature.
my two cents.
specifying the fqcn in the playbook fields could be parsed with regex ![\.yml|\.yaml]$
this along with either an additional check box ( is collection ) or using the project field with a unique (i.e. __collection[-1.0.0]
) value could be enough to tell AWX it's a collection project.
Please confirm the following
Feature type
New Feature
Feature Summary
There is a feature in Ansible-core to run a playbook that exists inside of a collection:
https://docs.ansible.com/ansible/latest/collections_guide/collections_using_playbooks.html#using-a-playbook-from-a-collection
This is an issue to gain feature-parity with this ability in AWX.
Specifying a playbook inside of a collection, inside of an execution environment, can be done by the FQCN name of the playbook, as explained in the linked docs.
This would replace what is now provided by the job template fields
project
andplaybook
fields. Whether a new field may be introduced, or existing fields abused for this purpose is left as an issue for implementation.Select the relevant components
Steps to reproduce
Run on Ansible CLI
Try to do same thing in AWX
Current results
Can't do it.
Sugested feature result
Ability to run playbook defined by FQCN
my_namespace.my_collection.playbook1
, as an example.Additional information
Implementation could go in many different directions:
playbook
fieldscm_type
option to "defer to EE", this maybe a coherent way for us to perform an async operation to inspect the image and obtain a playbook list, and requiring no other changes to the existing UX around job templatesThis is related to the existing issues https://github.com/ansible/awx/issues/3780 and https://github.com/ansible/awx/issues/3776. While 3780 would provide something similar via a different content mechanism, and 3776 is old, vague, generally unclear, and doesn't necessarily ask for this RFE.