Bootstrap FreeKB - Ansible - ansible-galaxy search command
Ansible - ansible-galaxy search command

Updated:   |  Ansible articles

Before downloading a role using the ansible-galaxy install command, you will first need to find the role that you want to install. Often, this is done by searching the Ansible Galaxy website for the role you want to install. For example, here is the HTTPD role on the Ansible Galaxy website.


Or, you can use the ansible-galaxy search command to find the role you want to install. For example, here is how to search for an HTTPD role.

ansible-galaxy search httpd


Which should return something like this. Typically, a large number of results will be returned.

 Name                                                    Description
 ----                                                    -----------
 2kloc.trellis-monit                                     Install and configure Monit service in Trellis.
 aarunmichael.base_httpd                                 your role description
 a_arvind_k.base_httpd                                   your role description
 abdusamy.web_server_role                                Deploy http virtual hosts using customized configuration
 acandid.httpd                                           Install httpd and ssl.
 acropia.httpd                                           IT Professional


If you know the name of the author of the role, the --author option can be included.

ansible-galaxy search httpd --author bertvv


Or like this.

ansible-galaxy search bertvv.httpd


Which should greatly reduce the results.

Found 2 roles matching your search:

 Name           Description
 ----           -----------
 bertvv.httpd   Installs the Apache web server on a RedHat based Linux distribution.
 bertvv.rh-base Ansible role for basic setup of a server with a RedHat-based Linux distribution (CentOS, Fedora, RHEL, ...) with the systemd init system.


The ansible-galaxy info command to display more information on a role.


API Server

By default, the ansible-galaxy command will connect to If you have your own internal Galaxy server, the -s or --server option can be used to point to your own internal Galaxy server.

ansible-galaxy search bertvv.httpd --server

Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee


Add a Comment

Please enter 4d29ad in the box below so that we can be sure you are a human.