Ansible Galaxy 2.0 Launches

January 27, 2016 by Chris Houseknecht


The BETA sticker is off, and Galaxy 2.0 is live! This is our biggest release to date, and it’s packed with some great features you’re going to love.

Here’s a quick run-down:


There really should be a drum roll playing as you read this, because this feature has been at the top of everyone’s wish list for as long as Galaxy has been around. But here it is… Organizations now have a home in Galaxy. Yes, you can import roles into an organization!

How, you ask? Just click the import button. Really. That’s it. The role will be imported exactly as the repository appears in GitHub. If the role belongs to ‘acmeco’ in GitHub, then it will appear under ‘acmeco’ in Galaxy.

You can import any repositories from GitHub where you are a collaborator or owner. Log in as yourself, and import your roles or your organization’s roles.

Existing roles prior to Galaxy 2.0 have not been changed. To move a role from your username to an organization, delete the role and import it again.

Semantic URLs

Sharing links to your content in Galaxy now makes sense with user-friendly URLs that include GitHub username or organization and the role name:<your name or ogranization>/<role name>

No More Ratings!

GitHub stars are what really matter, and now you can access the GitHub Star and GitHub Watch buttons directly in Galaxy.

Download Counts

Wouldn’t it be nice to know how many people are using a role? Going forward, we’ll be tracking each time a role is downloaded and installed by the ansible-galaxy client. It won’t be a perfect measurement, but it should give us a reasonable approximation.

Simple Role Management

Now with the toggle of a switch you can import any of your GitHub role repositories. If you have access to a repo, and it looks like a role (i.e. it contains a meta/main.yml), it will appear on your My Roles page, where it can be imported.

And if you don’t want the role in Galaxy anymore, slide the toggle the other way, and you’re role is deleted.

Smarter Role Imports

Import results are now presented on your My Imports page, allowing you to see the full detail of an import. If something is wrong, you’ll know right away from the color coded messages what needs attention.

Travis Integration

<Insert another drum roll here.> Automating role imports is another feature that has long been on everyone’s wish list. Well… It’s here!

Here’s how it works:

  1. On the My Roles page in Galaxy add your Travis token to any role you want to integrate with Travis CI. (Your token is not stored in Galaxy. It is used to calculate a hash as described in the Travis documentation and then discarded.)

  2. Enable the repo in Travis.

  3. Add a .travis.yml file to your repo that includes a notifications section with webhooks pointed to the Galaxy server:



  1. Push the changes to your GitHub repo.

Once integrated, the Travis badge will appear on your role in Galaxy, and going forward, each time you push a change to GitHub the updates will automatically appear in Galaxy.

For a full .travis.yml example run the init command with the ansible-galaxy command line tool. Starting in Ansible 2.0 the generated scaffolding includes a working .travis.yml file and related tests folder.

You can also associate Galaxy imports with a specific branch by assigning the name of the branch to ‘github_branch’ in meta/main.yml:

Watch a short video of the automating role imports process.




Alternate Role Names

We almost dropped this feature, but it lives on by popular demand. The only difference is, you can now name your role whatever you like. Whatever you type in the Alternate Role Name field is the name your role will receive.

Command Line Improvements

The ansible-galaxy command line is new and improved as well. The updated version shipped with the release of Ansible 2.0. It includes: find import, delete, setup and login commands to provide a full set of role management tools. The search command offers better query capabilities and improved output. And as mentioned earlier, the init command delivers a sample test playbook and .travis.yml file to help you test your role and automate imports.

Be Inspired

Hopefully by now you’re feeling inspired to jump in and start creating and sharing Ansible roles. We think these new features make Galaxy a much better tool for doing just that, and we hope you do to. As always, let us know about your experience at Galaxy Issues.


Ansible, Ansible Galaxy


Chris Houseknecht

Chris is the Principal Engineer at Ansible by Red Hat. Starting as employee number five, Chris keeps watch over Ansible Docker modules, maintains Ansible Galaxy and is the lead Engineer for Ansible Container. When he’s not working he spends his time cooking, walking his dogs or outside on his mountain bike or motorcycle. He can be found on twitter at @chouseknecht.

rss-icon  RSS Feed

Ansible Tower by Red Hat
Ansible In-Depth Whitepaper
Ansible Tower by Red Hat
Learn About Ansible Tower