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.
By default, the ansible-galaxy command will connect to https://galaxy.ansible.com. 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 http://galaxy.example.com