Skip to content

Conversation

@rjeffman
Copy link
Member

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.

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
@rjeffman rjeffman requested a review from t-woerner March 17, 2025 18:51
@rjeffman rjeffman changed the title collection: Allow playbooks to be executed using collection WIP: collection: Allow playbooks to be executed using collection Mar 17, 2025
@rjeffman rjeffman marked this pull request as draft March 17, 2025 18:52
@rjeffman rjeffman added the DRAFT label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants