ansible-collection commands

Hi

The Ansible team has recently introduced collections in Ansible 2.8 and as part of our ongoing development we have been working on creating a way to build, publish, and install collections using the ansible-galaxy command. We have recently merged the first iteration of this work with https://github.com/ansible/ansible/pull/57106 and I encourage you all to try it out and let us know about any issues or other feedback you may have around it.

Docs are still forthcoming but I’m currently working on improving that for people just picking it up. Starting off, you can view all the relevant commands by running ‘ansible-galaxy collection --help’ as well as help for individual commands like ‘ansible-galaxy collection --help’. So far we have implemented the following commands;

  • init - Create a basic collection skeleton, docs for this still need to be fleshed out but it will give you a basic skeleton you can start off with
  • build - Create a collection artifact as a .tar.gz file. This artifact can be published or stored wherever you like
  • publish - Publish the collection to Ansible Galaxy
  • install - Install a collection artifact either from Ansible Galaxy, or a filepath/url to the tarball

This is still an ongoing development so your feedback is crucial for us to produce something nice and polished for the Ansible 2.9 release.

Thanks