Previously, we created a playbook to check the connectivity of your local host or the host.
We were running Ansible software.
Now we will do the exact same thing, except we will check the connectivity of our remote client or
anything that is inside of our host file, the inventory list.
All right.
So it's just that simple.
We'll become route, go to our Ansible playbooks and we will create a new YAML file client status.
And here is the list of things that we will write it down inside of our client status YAML file.
If you notice, this looks very similar to what we had or created a playbook when we wanted to check
the client connectivity of our local host.
The only difference that you probably notice is right here.
The host is here, all which is indicating that all the hosts inside of ETSI Ansible host file should
be part of this Ansible playbook or this Aspa playbook should be executed on all of those remote clients.
This task is the same name is the same.
The module that we are using is the same, and of course the command that we will use is the same as
well to run that playbook, which is Ansible playbook and the name of that playbook.
So we'll go to our Linux machine, which is our control node.
Logging route to let's clear the screen and we'll go to our at C Ansible Playbooks directory here in
the playbooks we already have.
A connectivity.
The playbook that we created, which if you remember, which is the first YAML file.
So if you do more on first yaml file, this is the one that we created for a local host.
So what we'll do is the best thing is we'll copy that first YAML and we'll create a new one as client
status dot yaml.
All right, now we will edit that new playbook and we will leave everything as is except will change
the name.
Oops.
To my first playbook.
They will change that to.
Check.
Remote clients connect.
Activity.
All right.
And we will change from local host.
To all the tasks.
The name of the task is the same.
The module is the same, nothing changed.
So let's save it and let's run it real quickly and we'll finish this lecture real quick so we can move
to the more complicated playbooks in the next lecture.
So let's run Ansible Playbook, client status, dash, yaml and enter.
Right here is the name of our playbook.
Check remote client connectivity, which is right here.
It's running against all which is going to see Ansible host file and it found only one IP address and
that is ten 250 31115.
Okay.
The test connectivity is okay and the result came back okay and it's showing that it pinged that client
and it's able if you shut down your one second right here.
If you shut down.
Your client, which is right here.
This is your client.
If I power this off right now and run this playbook, then it will fail.
I mean, the playbook would run, but the test would come back as fail.
All right.
So this is your first playbook to execute against our remote clients.