Okay friends, so here is the validation solution.
So the first thing that I'm going to have to do is to use dnf to download the
rail system
roles on my control mode.
So I'll say sudo dnf install rail-system-rolls and to enter.
As it transpires I already have these roles on my system, so I don't have to do
anything
further.
If you don't you would just say why, to confirm the install and then hit enter.
Now what I'm going to have to do is to write a playbook that uses a rail system
role to
deploy a post-gracio server on each of my managed devices. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
deploy a post-gracio server on each of my managed devices.
Now to call the best place to go here is enter the documentation.
So if I go into user-share-dulk-rail-system-rolls, do an LS, what it is I want
to configure
is a post-gracio server.
Now we actually see the post-gracio directory here, so a good idea would be to
go into that
particular directory.
So if I do an LS, here we can see an example basic playbook and what I will do
is I will
just copy that basic example.
And all I'm going to do is copy it to my home directory.
So let's use the tilde logo or tilde character, should I say, and to enter, let WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's use the tilde logo or tilde character, should I say, and to enter, let
's do a CD.
We'll now back to the home directory.
If I do an LS, here is the example basic playbook.
So if I go into this using Vim, check this out right here.
Here is the example we have.
Now what we have to do is to configure post-gracio on all of our managed
devices.
Now right now this particular playbook is just targeting the control node.
So we want to make a modification here and I will change this to all.
As per the instruction, the version of post-gracio should be version 13.
So let's go and change the version here from 10 to 13. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go and change the version here from 10 to 13.
And what I'm also going to have to do is to create an additional task.
So if I just say tasks, colon and then have my hyphen give the task a name, the
name should
be validation task.
And all I have to do is to print out the message automation is fun.
So I will use the debug module and then the message is going to be, as we just
said, automation
is fun.
Perfect.
Let's just save these changes.
Now before I run this, let me clear the screen.
And if I go to my managed devices, if I say systemctl status on post-gracio and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And if I go to my managed devices, if I say systemctl status on post-gracio and
to enter,
notice right now we don't have a post-gracio service on the device.
The same thing is true on the blue box.
However, now that we have this role, I can just say Ansible Playbook, example
basic playbook
and to enter the playbook begins to execute and the changes are beginning to be
made.
And we can see the review, we have 17 OKs with seven changes, 17 skip tasks,
nothing unreachable,
no fears.
And look at the very end here, we also have our validation task saying
automation is fun. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
automation is fun.
If we go to our devices, the managed devices that is, let's start with yellow
box, just
add a warp and to enter, notice that right now we have a post-gracio database
server
running on our device.
Similarly, let's go to the blue box, do a systemctl status on post-gracio, hit
enter.
As we can see here, we also have an active and running post-gracio database
server.
So that is us for our validation on Ansible roles.
I hope this has been informative for you and I'd like to thank you for viewing.