WIP: collection: Allow playbooks to be executed using collection #1345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When available in a collection 'playbooks' directory, playbooks can be directly accessed as roles and modules: 'namespace.collection.playbook'. This allows, for example the deployment roles to be executed with the provided ansible-freeipa playbooks requiring minimal effort from the user part.
In order to be accessible, though, the playbooks must not use dash ("-") on the file names, as they are replaced by underscorse ("_") during Ansible processing and then, the files are not found.
By renaming the playbooks that, currently, do not set any variable as an usage example, replacing "-" by "_", we allow the FreeIPA collection playbooks to be executed without the user having to search for the correct file, like:
$ ansible-playbook -i inventory freeipa.ansible_freeipa.install_server
Note, however, that this will have impact in all documentation related to ansible-freeipa.