Forrest logo
back to the ansible-galaxy tool

ansible-galaxy:tldr:8275f

ansible-galaxy: Install a role.
$ ansible-galaxy install ${username}.${role_name}
try on your machine

The command "ansible-galaxy install ${username}.${role_name}" is used to install an Ansible role from Ansible Galaxy, a repository for sharing and managing Ansible content.

Here's a breakdown of the command:

  • "ansible-galaxy install" is the main command to install Ansible roles.
  • "${username}" represents the username or organization name under which the role is published. It is usually the owner or creator of the role.
  • "." is used to separate the username and the role name.
  • "${role_name}" represents the name of the role you want to install.

When executing this command, Ansible Galaxy searches for the role specified in the repository. If found, it downloads and installs the role in a location where Ansible can locate it later during the playbook execution.

For example, if you want to install a role called "webserver" created by the user "john-doe", you would replace "${username}" with "john-doe" and "${role_name}" with "webserver" in the command:

ansible-galaxy install john-doe.webserver

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ansible-galaxy tool