ci: publish collection on galaxy
https://docs.ansible.com/ansible/devel/dev_guide/developing_collections_distributing.html
Steps to publish a collection on Ansible Galaxy:
Steps to publish a collection:
- Add needed info in galaxy.yml file at the root of the collection folder (docs is here)
- Create a tarball of the collection at the root of the collection folder:
collection_dir#> ansible-galaxy collection build
. The tar.gz file is the one t upload to the distribution server. - Check locally that the collection is working correctly (docs is here)
- Publish the collection on Ansible-Galaxy:
ansible-galaxy collection publish path/to/my_namespace-my_collection-1.0.0.tar.gz --token API_TOKEN
. Be careful about the version number, it has to be newer than the last version published (https://docs.ansible.com/ansible/devel/dev_guide/developing_collections_distributing.html#understanding-collection-versioning) You can also upload the tarball on Ansible-Galaxy website directly (My Content > Add Content > Upload New Collection // Docs here)