So remember in the previous video, I made mention of the repos that are going
to effectively house all of the software that our package manager is going to
effectively communicate with in order to get the packages that we want on our
system.
What we want to look at now is the actual configuration of the repositories
that we happen to use.
Now like I said in the previous video, in the Etsy directory, we're going to
have a directory called yum, repos.d.
And inside of here, we can actually see these dot repo files. Now if we happen
to go into these files, pretty much, we've got some basic information. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to go into these files, pretty much, we've got some basic information.
So we can see we have the name direct to fear saying red, hat, open, shift
container platform for 15 to four.
That is a big, big mouth though. Nevertheless, you kind of get the drift. We
have all of these options.
The next one is the base URL, which pretty much points us to a URL whereby we
can actually communicate with the server itself or with the repository should I
say.
We also have this option for a GPG check, which is at the value one, which
means GPG check is enabled.
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
GPG is just a form of cryptography. Basically, when we have our GPG check, we
are going to leverage encryption to ensure that we're talking to the correct
server.
Pretty much what we are actually using here is a digital signature because
after all, we do not want someone to impersonate this particular repository.
And then we try to go out to download software from what we think is a trusted
source. And instead, we maybe go and download some type of virus.
So if you happen to be communicating over the public internet, for example,
having GPG check set to enabled is a very good idea. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
having GPG check set to enabled is a very good idea.
However, as we are going to do later on, if you happen to configure a local
repository whereby your own local server is acting as the repo, then this isn't
quite so urgent to do.
It is a good check to have him play, don't get me wrong, but it isn't quite so
urgent or as essential as it is when you happen to be communicating via the
public internet.
So basically we have these types of files within a particular location which
your package manager can use to deduce which configurations we should use when
consuming repositories.
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
What we want to be able to do is we want to be able to use Ansible to actually
manipulate our repository configuration.
So let me go and show you the module that we can use to do such a thing.
Okay, so we're back on the big old Google machine if I just happened to search
for Ansible and then look for the YUM_Repository module.
If we click this top link right here, once again, this is a built-in module.
So it's going on down, we can see the synopsis right here, pretty much telling
us what this is going to do.
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
It's going to allow us to add or remove YUM_Repositories in RPM based Linux
distros, so that is going to be a RETA enterprise Linux or any other of the
closely associated distributions such as Rocky Linux, that type of thing.
So let's look at some of the options right here.
If we scroll on down, here is a very important one.
We have our base URL which takes a list object containing elements of the
string type.
And pretty much this is going to allow us to specify the URL to the directory
where the YUM_Repository's repo data directory lives. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then we'll talk about this particular directory very, very shortly.
We're going to be able to generate this with a very particular command known as
create repo.
And it's basically going to house some metadata that we're going to inspect.
Scrolling on down, it'll also be further, we can see we have a description
parameter here.
This is going to be a human readable string describing the repository.
We also see this option for GPG check.
This is going to be a billion value, either true or false.
Pretty much this is going to specify whether YUM should perform that GPG
signature check WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
on the pages that we happen to be consuming.
So really if you happen to be configuring a local repository and a little lab
environment,
this is really not so necessary.
Any real world enterprise grade environment, then it would be a good idea to
invoke this check.
Again, this would be your own decision.
So as you can see scrolling on through, we have a whole ton of other options.
I'm not going to go through everyone right here.
But look at this one right here.
We have the name parameter very, very crucial.
This is a require parameter.
So we needed an order for the module to operate. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we needed an order for the module to operate.
What we're going to have to do here is to specify a unique repository ID.
Pretty much when we happen to go, let me just show you here.
Let's go to one of our devices.
If I say DNF, repo list or YUM repo list, like I said, it's basically the same
command.
On the left hand side, we can see this field for repo ID.
And this is exactly what we're talking about right here.
We have this shorthand here called engine X, which is going to be an engine X
based repository.
Quite simply, that is what this particular parameter is attempting to do. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So now we are aware of this YUM repository module.
And pretty much this is going to allow us to configure our clients to look
towards a specially
configured repository that we wanted to use.
So here is what we're going to do.
We're going to have our Ansible control node, and we want to configure this
device to actually
act as a repository server.
And then out on our managed devices, either the blue box or the yellow box, we
want to
configure these devices to actually use this particular server or Ansible WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
configure these devices to actually use this particular server or Ansible
control node as
a valid repository.
How are we going to instruct these devices to use this server?
Well, you guessed it, we're going to use the YUM repository module that we're
just looking
at.
So how about we go and set up this server configuration, and well, that's what
we're doing in the very