So friends, as you know, throughout this course so far, we have had a dedicated
control mode
running Ansible. Pretty much this is just a Red Hat Enterprise Linux machine
and we went
installed Ansible directly onto it. Now, would it surprise you to learn that
actually is another
way to run Ansible and this is via the use of something known as Ansible Nav
igator. And the cool
thing about Ansible Navigator is that it's actually going to leverage the
containerization technology.
So you may recall in the prerequisite exam, the Red Hat Certified System Admin, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So you may recall in the prerequisite exam, the Red Hat Certified System Admin,
we actually
explicitly dealt with a subject of containerization. More specifically, we
utilized a tool known as
Podman. And if you recall, Podman allowed us to pull down container images. And
from those
base images, we could create container instances. Now realistically, this is a
type of technology
that we're going to be leveraging when we use Ansible Navigator. What it's
going to do,
it's going to provide us what is known as an execution environment. And as such
, it's going
to give us all the benefits of containerization that we learned about before. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to give us all the benefits of containerization that we learned about before.
That said, of course,
when we happen to run Ansible within this execution environment, things are a
little bit different.
So what we're going to do in this particular video is to walk through some of
the basics of
Ansible Navigator and set it up before running some playbooks within the
execution environment.
So what we're waiting for, let's just get to it by first going to the Ansible
documentation.
So all I've done is search for Ansible Navigator Red Hat and all I'm going to
do to click this WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
do to click this
link right here, Introduction to Ansible Content Navigator. So let's just zoom
in a little bit
here. So directly from the Red Hat documentation here, it says that the Autom
ation Content Navigator
is going to allow you to develop things like playbooks, collections and roles.
And these are
going to be compatible with something known as Red Hat Ansible Automation
Platform. Now, we've
actually not seen the Red Hat Ansible Automation Platform. Pretty much, this is
just a graphical
user interface that we can use to effectively manage our automation system. We WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
user interface that we can use to effectively manage our automation system. We
will actually
look at this later on within this very course. Now, with respect to the actual
content navigator,
we can have this run on local development machines, as well as our automation
execution
environments. Now, the automation content navigator is also going to produce
things such as artifact
files. This is when you run a playbook, it will actually return or rather
create a JSON file that
is basically going to give you some diagnostic information about what happened
within your play.
This can be good when you want to troubleshoot issues. Just be aware though
that if you happen WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that if you happen
to have these files generated every time you're in a playbook, then of course
that is going to
use up some space. So we do want to be aware of that and perhaps even disable
it if we so wish.
Now, one thing you'll notice about the content navigator is that it's a text
user interface
a TUI. Pretty much it's going to give us this menu-like feel directly from a
thinner command line.
So the cool thing is we'll be able to look at their playbooks, watch particular
jobs, we'll be able to
check out our inventory and have our inventory be read in different formats WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
check out our inventory and have our inventory be read in different formats
such as JSON or
YAML or just INI, whatever it may be, as well as a whole bunch of other options
. Now, you'll notice
here is that we have two different modes of operation. The STD out mode, this
mode here is pretty
much going to present the output just like a regular Ansible Playbook would,
whereas when we happen to
run it in text, basic user interface modes, this is going to give us much more
of a menu-like feel
whereby we can explicitly navigate through that menu and select the exact
things that we want to see.
Now, some people may find this a little bit confusing the first time you happen WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now, some people may find this a little bit confusing the first time you happen
to use it. If you do
prefer, you can just get that more regular outlook by using dash M to specify
the STD out formats.
Just something to keep in mind. So with that said, now we have a rough idea
about what Ansible Navigator
is. The best thing to do is to get it installed and then see it in action
because that is going to
make things much much cleaner for us. Okay, so I am back on my Ansible control
node here. What I
want to do is I want to check out my repo list right now. So if I say pseudo WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
want to do is I want to check out my repo list right now. So if I say pseudo
DNA for a repo list
and to enter, we can see here the activated repositories that have my AppStream
repository as well as my
base OS. What I actually need to do though is to enable a specific repository
in order to install
Ansible Navigator because if I just say pseudo DNA install and I say Ansible
hyphen navigator right
now, it's going to check for this particular package and then it's just going
to say we do not
find a match. We are going to have to enable a very particular repository that
actually houses
this particular package. So recall we happen to register our system with red WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
this particular package. So recall we happen to register our system with red
hats. This allowed
us to enable our repositories and download packages from dnf and the similar
way we're going to be
using the same type of commands, the subscription manager command to check this
out. If I say
pseudo subscription manager repos and I say dash dash list and to enter, we're
going to connect to
red hat and we're going to get a list of all the available repositories. So the
very first thing
that you will notice is that we happen to have a ton of options right here. You
can easily drown
in this. So what I would suggest you do is you actually use a grip filter. So WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
in this. So what I would suggest you do is you actually use a grip filter. So
all I will do is
run the same command again, but I'll pipe the output into the grip command and
I will just set
for Ansible hyphen automation hyphen platform. Now if I hit enter, now we have
a much shortened
output here. Now what I want to point out is that your output may look a little
bit different.
Remember I happened to be using the arm architecture. So in my case here, the
extensions are a little
bit different here. I say arches 64. You might happen to see x86 64 that type WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
bit different here. I say arches 64. You might happen to see x86 64 that type
of thing.
Do not stress if your output is a little bit different. So regardless of this
part here
looks a little bit different. In my case here, I happen to have version 2.4.
Maybe when you
watch this, it might be 2.6 2.7. Who knows the point is not to get hung up. You
should expect
to see different options available to us. Notice I have a source RPMs as well
as a debug RPMs.
And then I just have the regular RPMs. It's this particular repository here
that I want to get.
The one that is just a regular. So don't install the debug. Don't install the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
The one that is just a regular. So don't install the debug. Don't install the
source.
So all I'm going to do here is I'm actually going to copy this repository ID.
So right click
and copy you. And now what I want to do is I actually want to enable this
particular repository
using subscription manager. So the way I do this is by saying so don't
subscription manager.
Repose and then I'll say dash dash enable. Now at this point here, all I want
to do is I want to
paste in that particular option that I saw. Okay, so in this case here, it's an
cable automation WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
cable automation
platform 2.4 for rail nine. So if I just hit enter, it's going to fetch the
contents and just give
it a moment to connect. Now we can see here it says repository, ancable
automation platform 2.4
for rail nine is enabled for this system. Therefore, if we rerun the command
pseudo dnf repo list
and to enter, we don't just have base OS and app stream. Now we have the animal
automation platform
repository. That means therefore, if I say pseudo dnf install, ancable hyphen WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
repository. That means therefore, if I say pseudo dnf install, ancable hyphen
navigator,
and I hit enter, check this out. We're now actually finding this particular
package.
If I say why and to enter, now it's going to run to the installation. And as we
can see,
the install has completed. Now what I can do is say, ancable hyphen navigator
and say dash dash
version. And if I hit enter, what I can see is I have version 3.4.1 again, your
version,
depending on when you watch this video, maybe a little bit different. Don't
worry about that.
Now recall with respect to Ansible content navigator, we want to make use of
this execution WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
this execution
environment simply meaning we want to be making use of containers. And as such,
if you recall,
what we need to have in order to spin up our container is to have the correct
container image.
So we're going to be utilizing the tool Podman to actually log in to the red
hat registry whereby
we can get access to those container images. Now this is going to require the
use of your
red hat accounts. So the same way we happen to utilize a username and a
password to register
or system. The same thing is true here. So what I'm going to do here is say, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
or system. The same thing is true here. So what I'm going to do here is say,
pseudo Podman login,
and I will say registry dot red hats dot IO. And if I hit enter, it's going to
prompt me from my
username. Now my red hat username is IPV zero. And now I'm going to have to
type in my password,
which I'm not going to tell you. So give them a moment. And if I hit enter, now
we can see the
login has succeeded with that now done. What I should be able to do is to pull
down Ansible
container images. So now with that done, all I'm going to do is run the command
Ansible navigator WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Ansible navigator
and to enter. Now the images begin to pull down. And once we have our images,
we now have access
to this text user interface. So if I want to go in to a particular option, say
for example, images,
it's pretty much like them. If I press colon, look at the bottom left hand
corner, and I just
take the words images and to enter, look at what we actually see here, we get
to see the images
that we have available. We have the execution environment supported for rail
eight. Now we
happen to be on rail nine, but the execution environment available right now is WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
happen to be on rail nine, but the execution environment available right now is
only for rail
eight, but this still is working for us. We can see when the environment was
created, it was 11
days ago, we can see the size, it's 1.76 gig. Now if I want to get out, I can
just press escape.
If I want to go into another option, say for example, settings, I can just say
colon settings.
This is pretty much how things are going to operate. So we can see all of these
different
settings, where if we want to display color, do we want to enable prompts that
type of thing,
we can scroll on down, you have the ability to go through all these options,
explore them at
your own leisure. But for now, I will press escape and escape again. So now we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
your own leisure. But for now, I will press escape and escape again. So now we
're back to a regular
interface. What you'll notice is that every time I happen to run the command
answerable navigator,
what it seeks to do, it seeks to pull in a new container image. This can
sometimes be a little
bit annoying, a little bit time consuming. So what we can do is override that
behavior by virtue of
setting an answerable navigator configuration file. So what I'm actually going
to do here is press escape,
and I'm going to generate a sample configuration file and then modify that WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and I'm going to generate a sample configuration file and then modify that
sample. So the way I
can do this, if I just clear the screen, and I just say answerable navigator,
and I say settings.
And what I'm going to do is to say dash dash G s to generate a sample, and then
I'll say dash
dash PP for pole policy, I'm going to set that to never. And then I'm going to
have my right arrow
to pipe the output into a file just called sample. Okay, call this anything you
so wish right now.
And if I hit enter, what we've actually done here is created this new
configuration file known as
sample. Now what I want to do with it now created, I want to rename it to be WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
sample. Now what I want to do with it now created, I want to rename it to be
answerable hyphen navigator
dot YML. Now the reason why I didn't just name it directly off the bad as
answerable navigator
is that with that convention, answerable navigator is going to seek to parse
that configuration file
directly. I don't want to do that first. I want to make my modifications. So I
'll just move this here.
It is now renamed as we can see right here. And all I'm going to do is go in
and modify this. So
if I just save them answerable navigator dot YML, this is the configuration
file that has been WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
file that has been
generated. So you can modify these configs if you so wish. Notice they happen
to be commented out
with the pound sign. So you're going to have to uncomment them for them to
actually take effects.
So say for example, you wanted to change the path of where your answerable
configuration
file is you could uncomment answerable as well as config as well as path and
then change the actual
value here that is a type of thing we're doing here. Similar if you want to
change plugins
or scrolling on down, perhaps where your inventory happens to be that type of
thing.
So what I'm going to do here is I'm going to scroll all the way down and I'm WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So what I'm going to do here is I'm going to scroll all the way down and I'm
going to find my
execution environment right here. So what I'm going to do here is I'm going to
go into insert modes.
And one thing I want to be aware of here, I want to actually maintain the
correct indentation. So
notice I actually have two spaces here. I will say backspace and then backspace
again. Basically,
I'm doing two backspaces. That is going to allow me to maintain the correct
indentation.
With that now done, if I scroll on down, what I want to go to is this option
here,
pull. So again, I'm going to go two spaces out and just say back back that will WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
pull. So again, I'm going to go two spaces out and just say back back that will
now uncomment
it and leave it in the correct indentation. And then scrolling on down, if I go
to policy right here,
once again, two spaces out and just do back back that is now uncommented. So
like I say,
when we happen to run answerable navigator right now, it's going to seek to
pull in a new image
every single run. If you want to modify the behavior, I can just set the pull
policy to be
missing. That means it's going to disuse the container image that is on the box
right now.
So with that now done, if I press escape, colon wq to writing quits, if I now WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So with that now done, if I press escape, colon wq to writing quits, if I now
say answerable
navigator and to enter, it's going to immediately snap me into my option right
here without any
delay, we're not trying to pull down any new images. So that's just an example
of one of the
many things that you can change within your configurations, like I say, change
the answerable
configuration for your location, whatever it is you want to do. So now that we
have the basics
of answerable navigator up and running, let's now begin looking at how we can
actually
explore our inventory using navigator as well as running playbooks. And well,
that's what we're
doing in the very next video. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
doing in the very next video.