So friends, let's walk through the actual installation.
Now recall, we can just directly install these
from the command line itself.
You could just say Ansible Galaxy, collection install,
and then say something like Ansible POSIX.
And as we can see here on my system,
this happens to be already installed.
But what we also could do is we can actually create
a requirements file, okay?
So I can just say vim requirements.yml.
And inside of here, I will have a key called collection,
and then I can just list all the collections
I want to install.
So I can say Ansible, net common, Ansible POSIX, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I can say Ansible, net common, Ansible POSIX,
and community.general, as well as community.docker.
So if I just save this right here,
what I can do is just simply reference this particular file.
So I'll say Ansible Galaxy, collection,
install and I'll say dash r to read in my requirements file.
So if I just use this particular file and I just hit enter,
we will now begin to pull in all of these collections.
So we can see the ones that have already been installed
are being skipped, but the other ones,
such as the net common and Ansible Docker,
or community Docker, should I say, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
or community Docker, should I say,
they have now been installed.
The way we can verify that this has been correctly installed,
we can say Ansible dash galaxy, collection, list, and to enter.
And now we can see here we have these collections installed,
net common, POSIX, Docker, and general.
Now just to highlight to you one other way
in which you may happen to install a collection,
is if you happen to set for Ansible collections,
if you scroll on down, we can see here
that you can also directly install from a tarball.
So depending if this is the only way in which you can access WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So depending if this is the only way in which you can access
a particular collection, maybe you have a particular file
to download, what you can do is simply just say,
Ansible Galaxy collection install and then provide the name
of the actual tarball file.
And then we can specify which directory do we want to install it into.
So in this case here, we're going to install this particular collection
into this particular folder on the system.
So just keep that firmly in your mind,
there are different ways we can get these collections.
We can just use Ansible Galaxy install directly via the command line.
We can use a requirements file.
And as we can see here, we can just install directly WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And as we can see here, we can just install directly
from downloaded files we have on our system.