So friends, let's talk a little bit about what Ansible actually is.
Well quite simply, at its most basic level, Ansible is an automation tool that
has been
developed by Red Hat.
So think about the tasks that you would do as a Linux administrator.
Perhaps you're managing 1000 servers and you want to go in and maybe modify the
DNS
settings, as opposed to having to log in to each device one by one by one.
To manually make those configuration changes yourself, utilising a tool such as
Ansible, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Ansible,
you can have that change be automated all at once and have the system updated
in the
blink of an eye.
Now the way Ansible operates, it uses something known as a push model.
Let me just describe what that looks like.
So imagine over here we had a Red Hat based system.
This could just be a virtual machine and on that system you happen to install
Ansible
Looker.
Here is going to be the machine that is going to manage all of the devices in
the network.
To say for example you had a whole ton of different servers that you're
managing.
One could be an Ubuntu machine, one could have it be Red Hat enterprise Linux WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
One could be an Ubuntu machine, one could have it be Red Hat enterprise Linux
as well,
one could be Fedora, one could be Kali Linux, it doesn't actually matter.
The point is if you happen to be a system administrator responsible for
managing all
these devices, having Ansible installed on one particular control mode will
allow you
to connect all of these devices at the same time and push out those updates.
Now the reason why we refer to Ansible as using a push model to make its
configuration
changes is if you happen to have let's maybe say two machines over here that
you're managing, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
you're managing,
the cool thing is that these devices here that happen to be managed by Ansible,
this
device here, these machines do not have to install any particular software you
don't
have to install Ansible here or here.
You simply install Ansible on the device that is going to be performing the
automation
in that Ansible enabled device simply pushes out those changes to these
different nodes.
So all happens from here and is pushed outward towards the network, that is
what we're referring
to.
Now as we move through this particular course there's going to be a strong WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now as we move through this particular course there's going to be a strong
emphasis on
something known as YAML, pretty much this is a file format that is designed to
be very
human readable but it allows us to actually utilise programmatic logic, just
like you
can do so with say for example Python code except this time the code that we're
writing
quote unquote really doesn't look like code, it is very very easy on the eyes,
really
really easy for system administrators to look at and understand.
Now with respect to Ansible the actual architecture can be broken down into
four core components. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
four core components.
The first component is the configuration file, typically this is going to be
called Ansible.cfg
and using this particular file you can specify global system settings, we'll
get to see
what this looks like in the very next video.
Crucially though within the configuration file we can also specify where abouts
we can find
the next component of the Ansible architecture and that is the Ansible
inventory.
Now the inventory basically tells Ansible what devices should be managed.
Now in our lab environment we have created two particular machines that are WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now in our lab environment we have created two particular machines that are
going to
be managed by Ansible so in order to let Ansible know about this we would
specify information
about those devices in the Ansible inventory so that could include things like
the IP addresses
of those particular devices or maybe their host names, that's how Ansible knows
which
devices it should actually be connecting to.
Now as you progress throughout this course we're going to learn that the
inventory can
be really really valuable, it can use things such as groups as well as by the
way groups
within groups otherwise known as nested groups but for now as our introduction WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
within groups otherwise known as nested groups but for now as our introduction
we don't
have to worry about that quite just yet, just understand that as a part of the
Ansible
inventory and it's one of the reasons why Ansible is so powerful.
Now the third component I want to talk to you about, this is something known as
variables,
this is a very well known concept within programming because when we happen to
be automating things
whilst a lot of the information might be very repetitive we can just
effectively have the
automation system push out the same changes to all devices, we understand that WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
automation system push out the same changes to all devices, we understand that
with respect
to particular configurations on particular systems we have a requirement for
some configurations
to be unique, basically they're not going to be the same, they're actually
going to be
varied depending on the device we are connecting to.
So say for example we're managing two devices right here, let's just call it
device one
and device two and let's just say this is our Ansible machine right here that
can connect
to these devices.
Now some things may be very common perhaps we're going to push out the same
change to
both devices, maybe that'd be safe for example some DNS server information WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
both devices, maybe that'd be safe for example some DNS server information
perhaps they're
both going to be updated to use the server 8.8.8.8 that is absolutely fine,
however maybe
at the same time whilst we're giving both devices the same DNS we want to
update their
IP address information and the IP addresses on these devices actually have to
be unique
we can't give the same IP address to both devices, as you're going to see the
way we
solve for this particular problem is via the use of these variables now we can
have things
known as host variables which are variable values unique to a particular host WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
known as host variables which are variable values unique to a particular host
in the
inventory but we can also have group variables these could be values unique to
a particular
group of devices perhaps we happen to have four devices in the UK and all of
those UK
devices have to get a particular NTP server that is different from all of the
servers
in the United States we can specify those UK unique values as a group variable
and target
all of the UK devices in the inventory.
Once again we'll get to see this in more detail later on as we progress now the
fourth and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
fourth and
final component here this is known as the playbook and really this is how we
tie everything
together it is inside the Ansible playbook which happens to be written in YAML
where
we actually tell Ansible what it is we want it to do this is where we write our
instructions
you know like go and configure a DNS server go and update the NTP
configurations go and
create a whole bunch of new users on all of these devices so now we have a
rough idea
about what Ansible is and what it can do what we want to now do is to begin
setting up our
system so that we can then slowly begin automating tasks across our managed WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
system so that we can then slowly begin automating tasks across our managed
devices now in this
particular skill we're not going to be looking at playbooks quite just yet or
the concept
of variable values but in the very next video we're going to be talking about
the creation
of that Ansible configuration file as well as the construction of our Ansible
inventory
once we have done that we will run Ansible against those devices to test for
basic connectivity
and that will have our lab up and running and put us in a really good place to
continue WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
continue
on this journey throughout this course when we will begin using these playbooks
to automate
a whole bunch of really cool and useful tasks so with that said let's get going
.