Anisble - Collection

Card Puncher Data Processing

About

Collections are a distribution format that package:

  • playbooks,
  • roles,
  • modules,
  • and
  • plugins.

You can publish and use collections through Ansible Galaxy.

Example

https://github.com/bcoca/collection

Management

Create

ansible-galaxy collection init  my_namespace.my_collection

Example: https://github.com/bcoca/collection

Build

Build the collection into a collection artifact

ansible-galaxy collection build

creates a tarball of the built collection in the current directory which can be uploaded to Galaxy.:

my_collection/
├── galaxy.yml
├── ...
├── my_namespace-my_collection-1.0.0.tar.gz
└── ...

Publish

Publish the collection artifact to Galaxy

ansible-galaxy collection publish
# or
ansible-galaxy collection publish path/to/my_namespace-my_collection-1.0.0.tar.gz --api-key=SECRET

Install

From the tarball created during the build

ansible-galaxy collection install my_namespace-my_collection-1.0.0.tar.gz -p ./collections

Documentation





Discover More
Card Puncher Data Processing
Ansible - Role

Roles is the reusable unit of Ansible. You may think of it as a function. It: helps make playbook content self-contained works well with things like git submodules for sharing content with others....
Card Puncher Data Processing
Ansible galaxy

Ansible Galaxy refers to the Galaxy website, a free site for finding, downloading, and sharing community developed roles. Galaxy content is formated in pre-packaged units...



Share this page:
Follow us:
Task Runner