DevOps Classroom notes 26/Nov/2026

ansible Collections:

  • ansible collections are packages used to distribute and manage ansible content. EX: ETL –> taldent.etl.dashboard –> Offical docs

Collections contain:

  1. modules: perform the tasks such as installation, creating users and managing services
  2. plugins: extended ansible functionality
  3. Roles: reusable playbooks
  4. playbooks: automation plays -> tasks, varibale, host, …etc
  5. Documentation: instructions for using collections

Collections name conventions

  • Ansbile collections follow this naming format
  • namespace.collection_name
amazon.aws
ansible.builtin

Install collections:

  • general command install collections
  • ansible-galaxy collection install amazon.aws
  • ansible-galaxy collection install Kubernetes.Core

Get list of collections:

ansible-galaxy collection list

~/.ansible/
--> collections/
  --> ansible_collections/
    --> amazon/
        --> aws/
    --> Kubernetes/
        --> Core

Community.general

ansible-galaxy collection install Community.general
- name: nginx
  host: all
  become: yes
  tasks:
    - name: install nginx
      community.general.apk
        name: nginx
        state: project

Install collections using requirment.yaml file

collections:
  - name: amazon.aws
    version: ">=12.0.0"
  
  - name: Kubernetes.Core
    version: ">=6.6.0"
ansible-galaxy collection install -r requirment.yaml

command create own collections:

ansible-galaxy collection init qt.linux

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%