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 - Ansible Tutorial
From the course: Ansible for Automation Essential Training: Advanced Playbooks, Roles, and Diverse Hosts
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
-
-
-
(Locked)
Installing collections2m 20s
-
Construct a simple playbook4m 19s
-
(Locked)
Using variables5m 7s
-
(Locked)
Using loops2m 45s
-
(Locked)
Adding conditionals4m 57s
-
(Locked)
Utilizing blocks3m 49s
-
(Locked)
Exploring templates4m 29s
-
(Locked)
Discovering handlers2m 23s
-
(Locked)
Using tags2m 53s
-
(Locked)
Testing plays with check mode2m 15s
-
(Locked)
Conditional failure with assert2m 20s
-
(Locked)
Failure and change control2m 32s
-
(Locked)
Nesting loops3m 29s
-
(Locked)
Creating dynamic inventory files3m 7s
-
(Locked)
Challenge: Create a complex playbook1m 17s
-
Solution: Verify the complex playbook2m 52s
-
(Locked)
-
-
-
-