Member-only story

Creating a New Ansible Collection: A Step-by-Step Guide

How to use the ansible-galaxy command to create a new test.test Ansible collection.

Luca Berton
5 min readAug 9, 2023

Introduction

Ansible Collections are a powerful way to organize and distribute your Ansible content, including modules, plugins, roles, and more. They allow you to package and share your automation resources in a structured and reusable manner. In this tutorial, we’ll walk you through the process of creating a new Ansible Collection using the `ansible-galaxy` command-line tool.

Step by step

Step 1: Installation and Prerequisites
Before you start, ensure that you have Ansible and the `ansible-galaxy` command-line tool installed on your system. If not, you can install Ansible by following the official documentation. Once installed, you’ll be ready to create your new Ansible Collection.

Step 2: Initialize a New Collection
To create a new collection, open your terminal and run the following command:

ansible-galaxy collection init test.test

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet