How to Install Ansible Galaxy Roles and Collections Updated on August 16, 2021 by InMotion Hosting Contributor 1 Minutes, 35 Seconds to Read Using Ansible doesn’t require you create everything from scratch. Ansible Galaxy encourages users to share pre-configured Ansible roles and collections for popular tasks and applications you can implement within playbooks immediately. These community submitted roles can save time when configuring playbooks for deployment. Remember, when browsing roles on Ansible Galaxy, it’s important to check stats such as last commit, quality score, community score, and download count. These stats help you understand the quality of submitted content. Below we’ll cover how to install content from the Ansible Galaxy community with examples: Install a roleInstall a collection Install Ansible Galaxy Roles Visit https://galaxy.ansible.comSearch for a role you wish to useSelect the role name for more detailsOpen your terminal (or SSH)Install the Ansible Galaxy role:ansible-galaxy install author.role – e.g. ansible-galaxy install geerlingguy.securityYou’ll see the URL for the downloaded role and extraction destination.Add the role in an Ansible playbook: Copy the installation command to your clipboard to get started tasks: name: Include geerlingguy's Security role include_role: geerlingguy.security Install Ansible Galaxy Collections An Ansible collection is a package of playbooks, roles, modules, and plugins for distribution. Collections show up in Galaxy searches alongside roles. When you select a collection, you’ll have two download options: Install the collection role from your terminal: ansible-galaxy collection install authorname.collectionname– e.g. ansible-galaxy collection install awx.awxSelect Download Tarball to download the compressed archive to your home folder, and install it from your terminal: ansible-galaxy collection install packagename.tar.gz– e.g. ansible-galaxy collection install awx-awx-9.2.0.tar.gz Here are two ways to implement Ansible collections in your playbooks: tasks: import_role: name: awx.awx collections: name: awx.awx tasks: Learn more about IT automation in our Ansible Education Channel. Looking to improve performance with your Ansible agent? Manage your Ansible agent with the Cloud Server that fits your needs. Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles Ansible and Docker What is Ansible? Ansible vs Terraform Getting Started with Ansible How to Install Ansible on a Linux Server WordPress UltraStack Ansible Playbook Tutorial Using Git to Manage your Workflow Ansible Galaxy and Prebuilt Playbooks Accessing your Ansible Control Node How to Backup Ansible