Ansible Galaxy

Ansible Galaxy is essentially a large public repository of Ansible roles. Roles ship with readmes detailing role use and available variables. Galaxy contains a large number of roles that are constantly evolving and increasing. Galaxy can use git allowing for other role sources such as GitHub.

Ansible ships with the ansible-galaxy command which may be used to install roles from Galaxy among other useful role management features. 'ansible-galaxy' can also create new empty roles in your working directory like so: 'ansible-galaxy init <role_name>'
Using 'ansible-galaxy install <username.role>', you can download roles from

Roles installed in the roles_path may be listed using 'ansible-galaxy list'

Remove, search, and login are other useful subcommands.

The -p flag allows specification of local role location (‘ansible-galaxy’ uses /etc/ansible/roles by default).

We can even write a playbook with ansible-galaxy install command:

Or use a standard install command:

We can read file:

Finally we can remove elastic role: