WEBVTT

1
00:00.000 --> 00:03.360
Okay friends, so here is the validation solution.

2
00:03.360 --> 00:06.560
So the first thing that I'm going to have to do is to use dnf to download the

3
00:06.560 --> 00:07.380
rail system

4
00:07.380 --> 00:08.880
roles on my control mode.

5
00:08.880 --> 00:14.520
So I'll say sudo dnf install rail-system-rolls and to enter.

6
00:14.520 --> 00:18.330
As it transpires I already have these roles on my system, so I don't have to do

7
00:18.330 --> 00:18.680
anything

8
00:18.680 --> 00:19.680
further.

9
00:19.680 --> 00:23.720
If you don't you would just say why, to confirm the install and then hit enter.

10
00:23.720 --> 00:27.230
Now what I'm going to have to do is to write a playbook that uses a rail system

11
00:27.230 --> 00:27.640
role to

12
00:27.640 --> 00:31.160
deploy a post-gracio server on each of my managed devices.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

12
00:27.640 --> 00:31.160
deploy a post-gracio server on each of my managed devices.

13
00:31.160 --> 00:34.320
Now to call the best place to go here is enter the documentation.

14
00:34.320 --> 00:40.080
So if I go into user-share-dulk-rail-system-rolls, do an LS, what it is I want

15
00:40.080 --> 00:40.840
to configure

16
00:40.840 --> 00:42.280
is a post-gracio server.

17
00:42.280 --> 00:46.830
Now we actually see the post-gracio directory here, so a good idea would be to

18
00:46.830 --> 00:47.480
go into that

19
00:47.480 --> 00:48.480
particular directory.

20
00:48.480 --> 00:52.440
So if I do an LS, here we can see an example basic playbook and what I will do

21
00:52.440 --> 00:53.000
is I will

22
00:53.000 --> 00:55.080
just copy that basic example.

23
00:55.080 --> 00:57.680
And all I'm going to do is copy it to my home directory.

24
00:57.680 --> 01:01.840
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

24
00:57.680 --> 01:01.840
So let's use the tilde logo or tilde character, should I say, and to enter, let

25
01:01.840 --> 01:02.440
's do a CD.

26
01:02.440 --> 01:04.120
We'll now back to the home directory.

27
01:04.120 --> 01:07.320
If I do an LS, here is the example basic playbook.

28
01:07.320 --> 01:10.520
So if I go into this using Vim, check this out right here.

29
01:10.520 --> 01:11.960
Here is the example we have.

30
01:11.960 --> 01:15.720
Now what we have to do is to configure post-gracio on all of our managed

31
01:15.720 --> 01:16.480
devices.

32
01:16.480 --> 01:20.520
Now right now this particular playbook is just targeting the control node.

33
01:20.520 --> 01:24.920
So we want to make a modification here and I will change this to all.

34
01:24.920 --> 01:29.320
As per the instruction, the version of post-gracio should be version 13.

35
01:29.320 --> 01:33.320
So let's go and change the version here from 10 to 13.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

35
01:29.320 --> 01:33.320
So let's go and change the version here from 10 to 13.

36
01:33.320 --> 01:36.000
And what I'm also going to have to do is to create an additional task.

37
01:36.000 --> 01:39.920
So if I just say tasks, colon and then have my hyphen give the task a name, the

38
01:39.920 --> 01:40.440
name should

39
01:40.440 --> 01:41.960
be validation task.

40
01:41.960 --> 01:45.200
And all I have to do is to print out the message automation is fun.

41
01:45.200 --> 01:48.980
So I will use the debug module and then the message is going to be, as we just

42
01:48.980 --> 01:50.080
said, automation

43
01:50.080 --> 01:51.080
is fun.

44
01:51.080 --> 01:52.080
Perfect.

45
01:52.080 --> 01:53.080
Let's just save these changes.

46
01:53.080 --> 01:55.400
Now before I run this, let me clear the screen.

47
01:55.400 --> 02:01.870
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

47
01:55.400 --> 02:01.870
And if I go to my managed devices, if I say systemctl status on post-gracio and

48
02:01.870 --> 02:03.080
to enter,

49
02:03.080 --> 02:06.680
notice right now we don't have a post-gracio service on the device.

50
02:06.680 --> 02:08.760
The same thing is true on the blue box.

51
02:08.760 --> 02:12.900
However, now that we have this role, I can just say Ansible Playbook, example

52
02:12.900 --> 02:13.800
basic playbook

53
02:13.800 --> 02:18.670
and to enter the playbook begins to execute and the changes are beginning to be

54
02:18.670 --> 02:19.280
made.

55
02:19.280 --> 02:24.000
And we can see the review, we have 17 OKs with seven changes, 17 skip tasks,

56
02:24.000 --> 02:25.040
nothing unreachable,

57
02:25.040 --> 02:26.040
no fears.

58
02:26.040 --> 02:28.960
And look at the very end here, we also have our validation task saying

59
02:28.960 --> 02:30.320
automation is fun.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

59
02:28.960 --> 02:30.320
automation is fun.

60
02:30.320 --> 02:33.670
If we go to our devices, the managed devices that is, let's start with yellow

61
02:33.670 --> 02:34.240
box, just

62
02:34.240 --> 02:38.720
add a warp and to enter, notice that right now we have a post-gracio database

63
02:38.720 --> 02:39.160
server

64
02:39.160 --> 02:41.400
running on our device.

65
02:41.400 --> 02:46.570
Similarly, let's go to the blue box, do a systemctl status on post-gracio, hit

66
02:46.570 --> 02:47.240
enter.

67
02:47.240 --> 02:51.780
As we can see here, we also have an active and running post-gracio database

68
02:51.780 --> 02:52.480
server.

69
02:52.480 --> 02:55.240
So that is us for our validation on Ansible roles.

70
02:55.240 --> 02:58.160
I hope this has been informative for you and I'd like to thank you for viewing.
