We are really excited to announce the release of Galaxy 1.1. It’s only been a few short weeks since Galaxy 1.0 debuted, and here we are again!
This time we added some powerful enhancements to make searching Ansible roles a much better experience. With over 3,500 roles in Galaxy and more being added every day, it can be a real challenge to sift through platforms, categories and descriptions to find exactly what you need. In Galaxy 1.1 we solved this problem.
As the author of a role, you know better than we do how to describe the role and what terms users will search to discover the role. So to make describing roles better for authors and users, we replaced our limited set a categories with Galaxy Tags, allowing the author to add a list of free-form search terms to a role.
Let’s take a quick look at creating a role with Galaxy and using the new Galaxy Tags feature. We start by creating a role using the ansible-galaxy command line utility that comes installed with Ansible:
ansible-galaxy init ansible-role-myrole
This creates the following directory structure and some supporting files for the new role:
ansible-role-myrole/ defaults/ handlers/ meta/ tasks/ templates/ vars/
Inside the meta folder is main.yml - a yaml file where you can provide a description and choose categories and platforms that fit the role. When the role is imported into Galaxy, the description, categories and platforms found in meta/main.yml become the means for users to search and discover the role.
Within meta/main.yml is a list of categories the author can choose from by uncommenting the ones that fit the role:
#categories: #- cloud #- cloud:ec2 #- cloud:gce #- cloud:rax #- clustering #- database #- database:nosql #- database:sql #- development #- monitoring #- networking #- packaging #- system #- web
Now with Galaxy 1.1 the author can ignore categories completely and instead add a list called galaxy_tags. For example:
galaxy_tags: - postgresql - sql - database - clone
NOTE: At the time of this writing the template meta/main.yml file generated by the latest Ansible stable release (188.8.131.52) still includes a categories list. That’s OK. Galaxy supports both a categories list and a galaxy_tags list. Regardless of which one is used, Galaxy will import the list as search tags.
With free form tags authors have more control over the way Galaxy indexes roles and thus how users discover roles. Roles can be filtered using a combination of tags:
Or, roles can be found by choosing from a list of popular tags:
In addition to rethinking categories, we also decided it was time to rethink the Browse Roles page. In its existing state Browse Roles failed to give users control over the search process. It made it difficult to combine multiple search terms. Searching by platform was slow. The text search field only filtered role titles. It just didn’t work.
The new search page allows filtering by any combination of keywords, tags, authors and platforms.
Combine multiple filters to narrow the list of possible roles:
When filtering by author, platform or tag Galaxy makes filtering a little easier by providing suggestions as you type:
Better Search Results
Search results are now organized in a way that provides a nice snapshot of each role and enough information to decide if a role is worth further exploration:
Each role is represented as a card containing the role’s title, description, a link to the author, supported platforms, tags, the date created and the average rating score:
Simple Role Ratings
We’re continuing to think about ratings. Up until now adding a rating to a role required providing several different scores for things like documentation, code style, wow factor, etc. It was complicated, and maybe even confusing.
We took the first step in making it better by consolidating all the different scores down to one. So to rate a role, just select a number from 1 to 5, and add a comment, if you like:
We track Galaxy open issues and enhancements at https://github.com/ansible/galaxy-issues. Here’s a quick look at everything included in release 1.1:
#56 Replacing categories with tags
#52 Confirm email with github account still says AnsibleWorks in subject header
#40 Document requirements file syntax
#22 Simplify Ratings
#15 Add distro filter to search
#13 Name with umlaut results in a parsing error
#12 Add title to role pages
Our goal is to make Galaxy the premier place for finding the best Ansible content. We think this release takes us a step or two closer, but we’re not done yet.
The exact features and bug fixes to be included in the next release are still being decided. Adding a role download count is on the list. We’re thinking about how to lint roles and how to test roles as well. Keep an eye on the release 1.2 milestones at Galaxy Issues to see what gets decided.
In the meantime, check out all the new search features in Galaxy 1.1. Finding roles to jumpstart your automation project just became a whole lot easier.