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.
This PR makes it possible to use the splunk-ansible repository with ansible-galaxy as a collection. This makes it useful to integrate splunk-ansible with other ansible projects.
For example, I use this to add the splunk universal forwarder to all of our machines as a part of our bootstrap process. Here is the code I can now use:
collections/requirements.yml
and run the following command to install the collection:
then in my playbook (splunk_universal_forwarder.yml):
you can then run the playbook like:
I had to move the library directory to plugins/modules so that ansible could find the plugins correctly in the collection environment. This should more universally work.
The galaxy.yml I build is very minimal, just enough to get it to work. I would expect it would need modified to better match the project.
Documentation on ansible collection development can be found at https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html
Documentation on ansible galaxy support can be found at https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html#collections-galaxy-meta