Creating Ansible Collection Using ansible-creator and VSCode Ansible Extension

Enhance Ansible Collection Creation using ansible-creator and the VS Code Ansible Extension.

Luca Berton

--

Introduction

Ansible, an open-source automation tool, has become a cornerstone in the world of IT automation and configuration management. While Ansible is known for its command-line prowess, some users find comfort in graphical interfaces. For those who prefer a visual approach to managing Ansible Collections, ansible-creator seamlessly integrates with Visual Studio Code (VSCode) and its dedicated Ansible extension. This combination provides an intuitive graphical user interface (GUI) for creating and managing Ansible Collections. In this guide, we will explore the steps to create an Ansible Collection using ansible-creator and the VSCode Ansible extension.

Step 1: Installing ansible-creator in the Environment

  1. Open VS Code and navigate to the Ansible icon in the activity bar.
  2. Click on “Get Started” to access the Ansible Creator section in the editor.

On the Menu page, the System Requirements box displays information about the current environment, including ansible, Python, and ansible-creator. If ansible-creator is not installed, proceed to install it. Ensure that all requirements display green ticks, indicating a ready environment.

Step 2: Initializing Collection by Filling an Interactive Form

  1. Click on “Initialize a collection” to access the “Init” interface, providing an interactive form.
  2. Enter the namespace and collection name, reviewing the format as you type.
  3. Specify the initialization path by using the folder icon to select the desired location for the collection.
  4. Set the verbosity of the output using the dropdown options.

--

--

Luca Berton

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