WEBVTT

1
00:00.000 --> 00:02.760
So friends, let's walk through the actual installation.

2
00:02.760 --> 00:05.280
Now recall, we can just directly install these

3
00:05.280 --> 00:06.480
from the command line itself.

4
00:06.480 --> 00:09.180
You could just say Ansible Galaxy, collection install,

5
00:09.180 --> 00:11.520
and then say something like Ansible POSIX.

6
00:11.520 --> 00:12.920
And as we can see here on my system,

7
00:12.920 --> 00:14.800
this happens to be already installed.

8
00:14.800 --> 00:16.960
But what we also could do is we can actually create

9
00:16.960 --> 00:18.600
a requirements file, okay?

10
00:18.600 --> 00:22.280
So I can just say vim requirements.yml.

11
00:22.280 --> 00:25.360
And inside of here, I will have a key called collection,

12
00:25.360 --> 00:27.240
and then I can just list all the collections

13
00:27.240 --> 00:28.600
I want to install.

14
00:28.600 --> 00:32.200
So I can say Ansible, net common, Ansible POSIX,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

14
00:28.600 --> 00:32.200
So I can say Ansible, net common, Ansible POSIX,

15
00:32.200 --> 00:36.920
and community.general, as well as community.docker.

16
00:36.920 --> 00:38.720
So if I just save this right here,

17
00:38.720 --> 00:40.920
what I can do is just simply reference this particular file.

18
00:40.920 --> 00:43.320
So I'll say Ansible Galaxy, collection,

19
00:43.320 --> 00:47.400
install and I'll say dash r to read in my requirements file.

20
00:47.400 --> 00:50.840
So if I just use this particular file and I just hit enter,

21
00:50.840 --> 00:53.680
we will now begin to pull in all of these collections.

22
00:53.680 --> 00:55.840
So we can see the ones that have already been installed

23
00:55.840 --> 00:57.440
are being skipped, but the other ones,

24
00:57.440 --> 00:59.680
such as the net common and Ansible Docker,

25
00:59.680 --> 01:01.360
or community Docker, should I say,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

25
00:59.680 --> 01:01.360
or community Docker, should I say,

26
01:01.360 --> 01:03.000
they have now been installed.

27
01:03.000 --> 01:05.200
The way we can verify that this has been correctly installed,

28
01:05.200 --> 01:10.200
we can say Ansible dash galaxy, collection, list, and to enter.

29
01:10.200 --> 01:12.440
And now we can see here we have these collections installed,

30
01:12.440 --> 01:16.200
net common, POSIX, Docker, and general.

31
01:16.200 --> 01:17.880
Now just to highlight to you one other way

32
01:17.880 --> 01:20.560
in which you may happen to install a collection,

33
01:20.560 --> 01:22.680
is if you happen to set for Ansible collections,

34
01:22.680 --> 01:24.680
if you scroll on down, we can see here

35
01:24.680 --> 01:27.560
that you can also directly install from a tarball.

36
01:27.560 --> 01:30.320
So depending if this is the only way in which you can access
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

36
01:27.560 --> 01:30.320
So depending if this is the only way in which you can access

37
01:30.320 --> 01:33.120
a particular collection, maybe you have a particular file

38
01:33.120 --> 01:35.760
to download, what you can do is simply just say,

39
01:35.760 --> 01:39.280
Ansible Galaxy collection install and then provide the name

40
01:39.280 --> 01:41.200
of the actual tarball file.

41
01:41.200 --> 01:45.080
And then we can specify which directory do we want to install it into.

42
01:45.080 --> 01:48.200
So in this case here, we're going to install this particular collection

43
01:48.200 --> 01:51.160
into this particular folder on the system.

44
01:51.160 --> 01:53.000
So just keep that firmly in your mind,

45
01:53.000 --> 01:54.800
there are different ways we can get these collections.

46
01:54.800 --> 01:57.920
We can just use Ansible Galaxy install directly via the command line.

47
01:57.920 --> 01:59.520
We can use a requirements file.

48
01:59.520 --> 02:01.760
And as we can see here, we can just install directly
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

48
01:59.520 --> 02:01.760
And as we can see here, we can just install directly

49
02:01.760 --> 02:03.800
from downloaded files we have on our system.
