RFE: add option(s) to ansible-playbook to check modules are found and what content source they come from #68989
Labels
affects_2.10
This issue/PR affects Ansible v2.10
bot_closed
feature
This issue/PR relates to a feature request.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
SUMMARY
There is a need to provide tooling for the following use cases:
I have a playbook and I want to check to see what modules I am using are not in ansible-base, rather now they live in collections. I want to know what collection they live in without having to manually search through routing.yml. I prefer not to know
routing.yml
exists. I want to know which ones these are without having to run the playbook and see where it breaks, following including roles andinclude_tasks
.I have a playbook and have installed in my environment a bunch of collections, I want to check and see what collection is going providing each module before running the playbook.
These address both users that are taking advantage of "tombstoning" as well as those who would like to update their content to explicitly use certain collections.
It provides a more sane way of developing and linting ansible content without having to take the approach of "just run it and see where blows up, then run it again and see where it blows up the next time" which is not a great development experience.
Currently, in order to figure out what collections my playbooks depend on, I either need to read ever task of every playbook and role and know intimately what has been moved (e.g. have routing.yml memorized) or run it and let it blow up, then manually look up what collection it is now hosted in by looking at https://github.com/ansible/ansible/blob/devel/lib/ansible/config/routing.yml .
#67684 is putting place "tombstoning" aims to enable people to not have to re-write their playbooks to be able to run with ansible 2.10, given that a collection is installed that provides the content that ansible knows to try based on https://github.com/ansible/ansible/blob/devel/lib/ansible/config/routing.yml
If indeed we are capable of doing such routing, then we should be capable of reporting to the user what that routing is without having to actually execute the playbook tasks.
ISSUE TYPE
COMPONENT NAME
collections
routing.yml
ADDITIONAL INFORMATION
This feature would allow me to:
Could look something like this:
Most basic, just show my modules mapped out w/ FQCN, have it behave like
--list-tasks
when it finds all some source for each module and show the source, have it fail like--syntax-check
when it fails.Alternatively, we might not need
--content-check
at all and all of the functionality could be rolled into--list-tasks
and--syntax-check
The text was updated successfully, but these errors were encountered: