WEBVTT

1
00:00.000 --> 00:04.640
So remember in the previous video, I made mention of the repos that are going

2
00:04.640 --> 00:07.890
to effectively house all of the software that our package manager is going to

3
00:07.890 --> 00:11.840
effectively communicate with in order to get the packages that we want on our

4
00:11.840 --> 00:12.000
system.

5
00:12.000 --> 00:15.860
What we want to look at now is the actual configuration of the repositories

6
00:15.860 --> 00:17.000
that we happen to use.

7
00:17.000 --> 00:21.770
Now like I said in the previous video, in the Etsy directory, we're going to

8
00:21.770 --> 00:24.000
have a directory called yum, repos.d.

9
00:24.000 --> 00:28.020
And inside of here, we can actually see these dot repo files. Now if we happen

10
00:28.020 --> 00:32.000
to go into these files, pretty much, we've got some basic information.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

10
00:28.020 --> 00:32.000
to go into these files, pretty much, we've got some basic information.

11
00:32.000 --> 00:35.170
So we can see we have the name direct to fear saying red, hat, open, shift

12
00:35.170 --> 00:38.000
container platform for 15 to four.

13
00:38.000 --> 00:42.070
That is a big, big mouth though. Nevertheless, you kind of get the drift. We

14
00:42.070 --> 00:43.000
have all of these options.

15
00:43.000 --> 00:47.850
The next one is the base URL, which pretty much points us to a URL whereby we

16
00:47.850 --> 00:52.250
can actually communicate with the server itself or with the repository should I

17
00:52.250 --> 00:53.000
say.

18
00:53.000 --> 00:57.100
We also have this option for a GPG check, which is at the value one, which

19
00:57.100 --> 00:59.000
means GPG check is enabled.

20
00:59.000 --> 01:03.640
GPG is just a form of cryptography. Basically, when we have our GPG check, we
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

20
00:59.000 --> 01:03.640
GPG is just a form of cryptography. Basically, when we have our GPG check, we

21
01:03.640 --> 01:07.470
are going to leverage encryption to ensure that we're talking to the correct

22
01:07.470 --> 01:08.000
server.

23
01:08.000 --> 01:11.380
Pretty much what we are actually using here is a digital signature because

24
01:11.380 --> 01:16.000
after all, we do not want someone to impersonate this particular repository.

25
01:16.000 --> 01:20.340
And then we try to go out to download software from what we think is a trusted

26
01:20.340 --> 01:23.000
source. And instead, we maybe go and download some type of virus.

27
01:23.000 --> 01:27.100
So if you happen to be communicating over the public internet, for example,

28
01:27.100 --> 01:31.000
having GPG check set to enabled is a very good idea.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

28
01:27.100 --> 01:31.000
having GPG check set to enabled is a very good idea.

29
01:31.000 --> 01:35.150
However, as we are going to do later on, if you happen to configure a local

30
01:35.150 --> 01:39.780
repository whereby your own local server is acting as the repo, then this isn't

31
01:39.780 --> 01:41.000
quite so urgent to do.

32
01:41.000 --> 01:44.890
It is a good check to have him play, don't get me wrong, but it isn't quite so

33
01:44.890 --> 01:48.750
urgent or as essential as it is when you happen to be communicating via the

34
01:48.750 --> 01:50.000
public internet.

35
01:50.000 --> 01:54.010
So basically we have these types of files within a particular location which

36
01:54.010 --> 01:57.800
your package manager can use to deduce which configurations we should use when

37
01:57.800 --> 01:59.000
consuming repositories.

38
01:59.000 --> 02:03.280
What we want to be able to do is we want to be able to use Ansible to actually
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

38
01:59.000 --> 02:03.280
What we want to be able to do is we want to be able to use Ansible to actually

39
02:03.280 --> 02:06.000
manipulate our repository configuration.

40
02:06.000 --> 02:10.000
So let me go and show you the module that we can use to do such a thing.

41
02:10.000 --> 02:13.360
Okay, so we're back on the big old Google machine if I just happened to search

42
02:13.360 --> 02:18.000
for Ansible and then look for the YUM_Repository module.

43
02:18.000 --> 02:23.000
If we click this top link right here, once again, this is a built-in module.

44
02:23.000 --> 02:26.590
So it's going on down, we can see the synopsis right here, pretty much telling

45
02:26.590 --> 02:28.000
us what this is going to do.

46
02:28.000 --> 02:33.380
It's going to allow us to add or remove YUM_Repositories in RPM based Linux
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

46
02:28.000 --> 02:33.380
It's going to allow us to add or remove YUM_Repositories in RPM based Linux

47
02:33.380 --> 02:37.910
distros, so that is going to be a RETA enterprise Linux or any other of the

48
02:37.910 --> 02:42.000
closely associated distributions such as Rocky Linux, that type of thing.

49
02:42.000 --> 02:44.000
So let's look at some of the options right here.

50
02:44.000 --> 02:47.000
If we scroll on down, here is a very important one.

51
02:47.000 --> 02:51.220
We have our base URL which takes a list object containing elements of the

52
02:51.220 --> 02:52.000
string type.

53
02:52.000 --> 02:56.880
And pretty much this is going to allow us to specify the URL to the directory

54
02:56.880 --> 03:00.000
where the YUM_Repository's repo data directory lives.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

55
03:00.000 --> 03:03.000
And then we'll talk about this particular directory very, very shortly.

56
03:03.000 --> 03:07.250
We're going to be able to generate this with a very particular command known as

57
03:07.250 --> 03:08.000
create repo.

58
03:08.000 --> 03:11.000
And it's basically going to house some metadata that we're going to inspect.

59
03:11.000 --> 03:14.890
Scrolling on down, it'll also be further, we can see we have a description

60
03:14.890 --> 03:16.000
parameter here.

61
03:16.000 --> 03:20.000
This is going to be a human readable string describing the repository.

62
03:20.000 --> 03:22.000
We also see this option for GPG check.

63
03:22.000 --> 03:25.000
This is going to be a billion value, either true or false.

64
03:25.000 --> 03:28.990
Pretty much this is going to specify whether YUM should perform that GPG

65
03:28.990 --> 03:30.000
signature check
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

66
03:30.000 --> 03:32.000
on the pages that we happen to be consuming.

67
03:32.000 --> 03:36.070
So really if you happen to be configuring a local repository and a little lab

68
03:36.070 --> 03:37.000
environment,

69
03:37.000 --> 03:39.000
this is really not so necessary.

70
03:39.000 --> 03:42.110
Any real world enterprise grade environment, then it would be a good idea to

71
03:42.110 --> 03:43.000
invoke this check.

72
03:43.000 --> 03:46.000
Again, this would be your own decision.

73
03:46.000 --> 03:50.000
So as you can see scrolling on through, we have a whole ton of other options.

74
03:50.000 --> 03:52.000
I'm not going to go through everyone right here.

75
03:52.000 --> 03:53.000
But look at this one right here.

76
03:53.000 --> 03:56.000
We have the name parameter very, very crucial.

77
03:56.000 --> 03:58.000
This is a require parameter.

78
03:58.000 --> 04:01.000
So we needed an order for the module to operate.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

78
03:58.000 --> 04:01.000
So we needed an order for the module to operate.

79
04:01.000 --> 04:05.000
What we're going to have to do here is to specify a unique repository ID.

80
04:05.000 --> 04:09.000
Pretty much when we happen to go, let me just show you here.

81
04:09.000 --> 04:10.000
Let's go to one of our devices.

82
04:10.000 --> 04:14.720
If I say DNF, repo list or YUM repo list, like I said, it's basically the same

83
04:14.720 --> 04:15.000
command.

84
04:15.000 --> 04:18.000
On the left hand side, we can see this field for repo ID.

85
04:18.000 --> 04:20.000
And this is exactly what we're talking about right here.

86
04:20.000 --> 04:24.630
We have this shorthand here called engine X, which is going to be an engine X

87
04:24.630 --> 04:26.000
based repository.

88
04:26.000 --> 04:30.000
Quite simply, that is what this particular parameter is attempting to do.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

89
04:30.000 --> 04:34.000
So now we are aware of this YUM repository module.

90
04:34.000 --> 04:38.000
And pretty much this is going to allow us to configure our clients to look

91
04:38.000 --> 04:39.000
towards a specially

92
04:39.000 --> 04:41.000
configured repository that we wanted to use.

93
04:41.000 --> 04:43.000
So here is what we're going to do.

94
04:43.000 --> 04:46.570
We're going to have our Ansible control node, and we want to configure this

95
04:46.570 --> 04:48.000
device to actually

96
04:48.000 --> 04:50.000
act as a repository server.

97
04:50.000 --> 04:55.410
And then out on our managed devices, either the blue box or the yellow box, we

98
04:55.410 --> 04:56.000
want to

99
04:56.000 --> 05:00.200
configure these devices to actually use this particular server or Ansible
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

99
04:56.000 --> 05:00.200
configure these devices to actually use this particular server or Ansible

100
05:00.200 --> 05:02.000
control node as

101
05:02.000 --> 05:03.000
a valid repository.

102
05:03.000 --> 05:07.000
How are we going to instruct these devices to use this server?

103
05:07.000 --> 05:10.680
Well, you guessed it, we're going to use the YUM repository module that we're

104
05:10.680 --> 05:11.000
just looking

105
05:11.000 --> 05:12.000
at.

106
05:12.000 --> 05:15.000
So how about we go and set up this server configuration, and well, that's what

107
05:15.000 --> 05:16.000
we're doing in the very
