DevOps Bootcamp · Lesson

Roles vs Collections on Galaxy

What you can pull from the hub.

Lesson 1 of 413 steps

Roles vs Collections on Galaxy is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 1 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.

You Are Not the First

Someone has almost certainly already automated the thing you need. Ansible Galaxy is the public hub where the community shares that work.

Galaxy in One Line

Galaxy is a website and registry at galaxy.ansible.com that hosts ready-made roles and collections you can install and reuse.

What a Role Bundles

A role packages tasks, handlers, templates, and default variables for one job, like setting up nginx or PostgreSQL, into a reusable unit.

What a Collection Bundles

A collection is bigger: it can ship many roles, modules, and plugins together under one versioned, distributable package.

Collections Are the Modern Unit

Since Ansible 2.10, even core modules ship inside collections. They are now the primary way content is packaged and distributed.

Naming Tells You Which

Collections use a namespace.collection name like community.general, while a standalone role is named author.rolename.

community.general
geerlingguy.nginx

Where Each One Goes

Installed roles land in your roles path, while collections install into a collections path. Both keep your project tidy.

Two Install Commands

You fetch content with ansible-galaxy: use the role subcommand for roles and the collection subcommand for collections.

ansible-galaxy role install geerlingguy.nginx
ansible-galaxy collection install community.general

Vetting What You Pull

Galaxy shows download counts and a community score. Prefer well-used content and always skim the source before trusting a role on your servers.

Built-In vs Galaxy

The huge community.general collection bundles with many installs, but Galaxy is where you reach for anything beyond that baseline.

Rule of Thumb

Need one focused job? Grab a role. Need a whole toolkit of modules and plugins for a platform? Grab a collection.

Quick Check

Tell apart the two kinds of content Galaxy distributes.

Recap

Galaxy shares community automation: roles bundle one job, collections bundle many. Pull either with ansible-galaxy and vet it first. 🌌

Free to start

Learn DevOps Bootcamp with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
142
Lessons
568

Frequently Asked Questions

Is the “Roles vs Collections on Galaxy” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Roles vs Collections on Galaxy”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.

What will I learn in “Roles vs Collections on Galaxy”?

What you can pull from the hub. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 1 of 4.

How long does the “Roles vs Collections on Galaxy” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Roles vs Collections on Galaxy
  2. Install Roles with requirements.yml
  3. Using FQCN: namespace.collection.module
  4. Publishing Your Own Role to Galaxy
← Back to DevOps Bootcamp