From the course: Ansible for Automation Essential Training: Advanced Playbooks, Roles, and Diverse Hosts

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Installing collections

Installing collections

- [Instructor] I know this section is titled Installing Collections, but first I need to explain what collections are. By default, only a handful of modules are included in the Community edition of Ansible. If and when you come to the point where you want to use a module that isn't already installed, you will need to do so via collection. A collection is an archive file that contains modules, roles, plugins, playbooks, documentation, and other objects. Installing a collection isn't too bad. It's generally done by issuing the Ansible-Galaxy Collection install command. But I will also need to ensure that I have all the Python dependencies. Take for example, the Azure collection. I'll take a look at its documentation page. Notice that towards the top, it lists the Ansible-Galaxy command to install the collection. I'll copy that and paste it into my server and give it a run. You can see by the output, I've already installed it, but had it not, it would go ahead and complete the install…

Contents