DevOps Bootcamp · Lesson

Publishing Your Own Role to Galaxy

Share automation with the world.

Lesson 4 of 413 steps

Publishing Your Own Role to Galaxy is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 4 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.

Give Back to the Hub

Once a role solves a problem cleanly, you can share it. Publishing to Galaxy lets anyone install your work with one command.

Galaxy Reads from GitHub

Galaxy does not host code itself. It imports a role straight from a public GitHub repository that you own.

One Repo, One Role

The cleanest setup puts a single role at the repo root using the standard scaffold from ansible-galaxy init.

ansible-galaxy init my_role

meta/main.yml Is Required

Galaxy reads meta/main.yml for metadata. Fill in author, a clear description, the license, and supported platforms before importing.

galaxy_info:
  author: yourname
  description: Configure nginx
  license: MIT

Write a Real README

Your README.md is the role's front page. Document what it does and list every variable it accepts with sensible examples.

Connect Your GitHub Account

Log in to galaxy.ansible.com with GitHub. This links your account so Galaxy can see and import your repositories.

Import the Repository

From your Galaxy dashboard you select the repo and trigger an import. Galaxy then reads the metadata and publishes the role.

Import from the CLI

You can also import without the website using an API token and the import subcommand, naming your GitHub user and repo.

ansible-galaxy role import yourname my_role

Tags Become Versions

Galaxy turns your Git tags into role versions. Push a tag like 1.0.0 so users can pin a specific, stable release.

git tag 1.0.0
git push --tags

Naming Comes from Your Repo

The published role's name is your github_user.repo_name, which is exactly how others will reference it in requirements.yml.

roles:
  - name: yourname.my_role

Keep It Maintained

Publishing is a commitment. Respond to issues and push fresh tags for fixes so the community keeps trusting your role.

Quick Check

Recall where Galaxy gets the code it publishes.

Recap

Scaffold the role, fill meta/main.yml and the README, push to GitHub, then import to Galaxy. Git tags become installable versions. 🚀

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 “Publishing Your Own Role to Galaxy” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Publishing Your Own Role to 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 “Publishing Your Own Role to Galaxy”?

Share automation with the world. 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 4 of 4.

How long does the “Publishing Your Own Role to 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