WEBVTT

1
00:00.000 --> 00:03.000
Okay friends, so let's walk through the validation solution.

2
00:03.000 --> 00:05.640
Okay, so the very first thing I'm going to have to do is to go down to my

3
00:05.640 --> 00:06.500
organizations.

4
00:06.500 --> 00:10.440
Let's click on this here, then I will choose Add, I'll give this a name, and it

5
00:10.440 --> 00:13.000
's going to be called Validation -org.

6
00:13.000 --> 00:16.610
So let's just save this. Then I'm going to have to create an inventory called

7
00:16.610 --> 00:18.000
Validation -inf.

8
00:18.000 --> 00:22.110
So we go to my inventory, let's add a new one, and it's going to be called Val

9
00:22.110 --> 00:23.000
idation -inf.

10
00:23.000 --> 00:25.500
And let's make this a member of our new organization.

11
00:25.500 --> 00:28.000
And all we'll do now is I will choose Save.

12
00:28.000 --> 00:31.880
Now what I want to do is I want to include both of my hosts, that happen to be
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

12
00:28.000 --> 00:31.880
Now what I want to do is I want to include both of my hosts, that happen to be

13
00:31.880 --> 00:35.000
my Blue Box and my Yellow Box within this inventory.

14
00:35.000 --> 00:39.330
So I will go to my hosts, and I will just choose Add, and the name will be the

15
00:39.330 --> 00:41.000
Blue Box, and I will choose Save.

16
00:41.000 --> 00:45.550
And I'll go back to Hosts, choose Add again, and this time I will add my Yellow

17
00:45.550 --> 00:46.500
Box as well.

18
00:46.500 --> 00:49.000
Again, choose whatever names are appropriate for your environment.

19
00:49.000 --> 00:52.000
If you don't have a Blue Box in Yellow Box, use the names you happen to have

20
00:52.000 --> 00:53.500
chosen throughout this course.

21
00:53.500 --> 00:57.400
Now what I want to do is I want to have a group called Nuggets, and both of

22
00:57.400 --> 01:00.500
these managed devices, it should be a member of that group.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

22
00:57.400 --> 01:00.500
these managed devices, it should be a member of that group.

23
01:00.500 --> 01:03.880
So if I look at my Validation -inf, this time if I go to the Groups tab, and I

24
01:03.880 --> 01:07.500
choose Add, I will have a group called Nuggets.

25
01:07.500 --> 01:09.500
And I will just choose Save.

26
01:09.500 --> 01:12.710
If I then go to my hosts that are going to be within this particular group, if

27
01:12.710 --> 01:15.500
I choose Add, and add an existing host,

28
01:15.500 --> 01:19.590
and I add both the Yellow Box and the Blue Box to this particular group and

29
01:19.590 --> 01:20.500
choose Save,

30
01:20.500 --> 01:24.240
now we can see here within my Groups I have the Nugget Group, and inside of

31
01:24.240 --> 01:28.000
here we have two hosts called Blue Box and Yellow Box.

32
01:28.000 --> 01:31.390
Now what I want to do is I want to create the appropriate credentials to log
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

32
01:28.000 --> 01:31.390
Now what I want to do is I want to create the appropriate credentials to log

33
01:31.390 --> 01:34.500
into these devices, so I'll go to Credentials, and I'll choose Add.

34
01:34.500 --> 01:37.500
Let's just give this a name of my credit, it doesn't actually matter the name,

35
01:37.500 --> 01:40.500
and the type is going to be a Machine Type,

36
01:40.500 --> 01:43.000
because after all we're going to be logging into two real devices.

37
01:43.000 --> 01:46.240
How do I actually manage the devices where they have an Ansible username on

38
01:46.240 --> 01:49.910
both devices, and the corresponding password for that account is Ansible once

39
01:49.910 --> 01:50.500
again.

40
01:50.500 --> 01:54.000
Now it's going on down, our Privilege_Escolation method is going to be pseudo,

41
01:54.000 --> 01:58.560
the user name will be root, and in my case here the root password is just

42
01:58.560 --> 02:00.000
simply password 1.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

43
02:00.000 --> 02:03.410
Whatever the root password is for you, you would supply that value here too,

44
02:03.410 --> 02:05.000
and now I will just choose Save.

45
02:05.000 --> 02:08.540
So with that now done, what I want to do is to create a private repository on

46
02:08.540 --> 02:12.000
GitHub that is going to have a playbook called ValidationPlay.YML.

47
02:12.000 --> 02:16.270
So over on my GitHub account, all I will do is I will choose New from New Rep

48
02:16.270 --> 02:19.900
ository, give this a name of anything you so wish, I would just call this Val

49
02:19.900 --> 02:24.400
idation repo, and again I'm going to make this a private repository as per the

50
02:24.400 --> 02:25.000
instructions,

51
02:25.000 --> 02:28.740
and I will also add a Ruby file to initialize this, and I will just choose

52
02:28.740 --> 02:30.000
Create Repository.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

53
02:30.000 --> 02:33.000
Now inside of here we should have a playbook called ValidationPlay.

54
02:33.000 --> 02:39.240
Let's go to Add, I'll create a new file, I'll just say ValidationPlay.YML, and

55
02:39.240 --> 02:41.000
now what I will do is I will write a playbook that is going to target the

56
02:41.000 --> 02:41.000
repository.

57
02:41.000 --> 02:44.520
So it is going to target the nuggets root, I'll give this a name, just call

58
02:44.520 --> 02:46.000
this maybe ValidationPlay.

59
02:46.000 --> 02:49.010
The host I should be targeting the nuggets root, I'll just say gather facts to

60
02:49.010 --> 02:51.000
be false to save time, we don't need those.

61
02:51.000 --> 02:55.540
And now I will define my tasks, and the task here is going to simply create a

62
02:55.540 --> 03:00.170
file on all devices, and I will use the Ansible built-in shell module, and all
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

62
02:55.540 --> 03:00.170
file on all devices, and I will use the Ansible built-in shell module, and all

63
03:00.170 --> 03:05.160
I will do is issue the command touch/tmp, and the file should be called aap-

64
03:05.160 --> 03:08.000
validation.txt.

65
03:08.000 --> 03:10.820
So this actually commit these changes, and now what I want to do is I want to

66
03:10.820 --> 03:15.400
ensure that the project is going to source playbooks from this repository, and

67
03:15.400 --> 03:18.910
I have to ensure that I have created source control credentials to access this

68
03:18.910 --> 03:20.000
private repo.

69
03:20.000 --> 03:24.470
So let me click my little icon here, I will go down to Settings, I'll scroll

70
03:24.470 --> 03:29.050
down the left to Developer Settings, choose Personal Access Tokens, then Tokens

71
03:29.050 --> 03:33.000
Classic, and now I will generate a new token, and click this here.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

71
03:29.050 --> 03:33.000
Classic, and now I will generate a new token, and click this here.

72
03:33.000 --> 03:36.230
So I can call this token, anything used to wish, I will just call this Val

73
03:36.230 --> 03:40.250
idation Token, and I'll make it available for seven days, and all I will do is I

74
03:40.250 --> 03:44.300
will click Fill Control of Private Repositories, and then I'll scroll all the

75
03:44.300 --> 03:46.000
way down and generate the token.

76
03:46.000 --> 03:49.450
Now what I want to do is I want to copy this token, and make sure I keep a copy

77
03:49.450 --> 03:50.000
of it.

78
03:50.000 --> 03:53.140
Now what I will do is I will go and create more credentials for the repo, so

79
03:53.140 --> 03:56.000
let's add a new credential, let's just call this a repo-cred.

80
03:56.000 --> 04:00.190
Credential type, this time is going to be source control, the user name, well
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

80
03:56.000 --> 04:00.190
Credential type, this time is going to be source control, the user name, well

81
04:00.190 --> 04:04.510
my log and user name for my personal get-tob is my email address of ipv0@gmail.

82
04:04.510 --> 04:09.090
com, and the password here is simply going to be that token I just generated, so

83
04:09.090 --> 04:13.460
if I just paste this in, we can see that it is, and all I will do now is scroll

84
04:13.460 --> 04:16.000
all the way down and save these credentials.

85
04:16.000 --> 04:19.460
Perfect, so with that now saved, what I want to do is create a project that is

86
04:19.460 --> 04:22.960
going to source the playbooks from this repository, so let's add a new project,

87
04:22.960 --> 04:27.000
which is called as Validation Project, the name itself doesn't matter so much.

88
04:27.000 --> 04:28.390
The organization, again we'll use the Validation org, the source control type

89
04:28.390 --> 04:29.660
is going to be get, and now the source control URL, so what I will do here is I

90
04:29.660 --> 04:39.000
'll go back to my repository, so I'll go to my Repos, let's go to Validation
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

90
04:29.660 --> 04:39.000
'll go back to my repository, so I'll go to my Repos, let's go to Validation

91
04:39.000 --> 04:43.070
repo, then I'll go into Code here and just copy the URL, and I will paste in

92
04:43.070 --> 04:45.000
this URL right here, and now specify

93
04:45.000 --> 04:49.100
the source control credential to log in here, so I will choose as the repo

94
04:49.100 --> 04:52.000
credits right here and select, and now I will choose Save.

95
04:52.000 --> 04:55.900
So with that now done, I want to effectively run the Validation Playbook from

96
04:55.900 --> 05:00.000
within a template, so let's go to my templates, and I'll add a new template,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

97
05:00.000 --> 05:03.040
let's go to Add Job Template, give this a name, which is called as Validation

98
05:03.040 --> 05:04.000
Job.

99
05:04.000 --> 05:08.130
The inventory is going to be targeting the Validation Inf, the project is going

100
05:08.130 --> 05:11.990
to be the Validation Project, and the playbook is going to be the Validation

101
05:11.990 --> 05:15.850
Hive and Play, now the credentials to log into the machine is going to be MyC

102
05:15.850 --> 05:20.670
reds, select that, then I will just tick Privilege Escalation, and then select

103
05:20.670 --> 05:21.000
Save.

104
05:21.000 --> 05:25.450
Once I've done that, I can scroll on down and click Launch, and that should now

105
05:25.450 --> 05:27.000
launch the playbook.

106
05:27.000 --> 05:30.330
The open appears I happen to have some type of syntax error within my playbook,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

106
05:27.000 --> 05:30.330
The open appears I happen to have some type of syntax error within my playbook,

107
05:30.330 --> 05:33.000
so that's my fault right there, let me go and correct that.

108
05:33.000 --> 05:37.000
Let's go back to the actual repository, let's go into Validation Play.

109
05:37.000 --> 05:40.430
Open, I can see actually here, but I've done wrong, I have my quotation mark

110
05:40.430 --> 05:43.700
here, and I didn't actually open it, so if I go in and edit this file, let me

111
05:43.700 --> 05:47.000
just get rid of that, and now I'll just commit the changes.

112
05:47.000 --> 05:49.560
Let me just go back to Answerable, let's go to My Templates once again, so I'll

113
05:49.560 --> 05:51.000
just delete this temporarily, okay.

114
05:51.000 --> 05:54.550
And in fact before I do that, I want to go to my projects in my Validation

115
05:54.550 --> 05:58.390
Project, and I actually want to synchronize the change because there has been

116
05:58.390 --> 06:01.830
an update, so let's go and click Sync here, and that will pull down any changes
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

116
05:58.390 --> 06:01.830
an update, so let's go and click Sync here, and that will pull down any changes

117
06:01.830 --> 06:06.560
, including any differences in the syntax, and now if I go to My Templates, I

118
06:06.560 --> 06:16.000
will just add the Job Template, again just a Validation Job, Infantory, is Val

119
06:16.000 --> 06:16.000
idation Inf, Project is Validation Project, which is now being synchronized and

120
06:16.000 --> 06:16.000
updated.

121
06:16.000 --> 06:20.200
We use the same playbook, choose the credentials of My Creds, scroll on down,

122
06:20.200 --> 06:25.000
choose privilege escalation, and save, scroll on down, and then choose launch.

123
06:25.000 --> 06:28.670
So we can see the job happens to be successful, we can go to the details and

124
06:28.670 --> 06:32.400
then look at the output, there we have all the output right here, if we go to
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

124
06:28.670 --> 06:32.400
then look at the output, there we have all the output right here, if we go to

125
06:32.400 --> 06:36.320
our devices, so in the case of the yellow box, if I go into the temp directory

126
06:36.320 --> 06:40.000
and do an LS, we can see we actually have the AAP hyphen Validation Text file,

127
06:40.000 --> 06:44.000
and again over on the blue box, which was also part of the nuggets group.

128
06:44.000 --> 06:48.020
If I see the n to the temp directory and do an LS, indeed we can see we also

129
06:48.020 --> 06:52.450
have that same text file, so that is us for our validation challenge on the Ans

130
06:52.450 --> 06:55.590
ible Automation Platform Automation Control Learn, I hope it has been

131
06:55.590 --> 06:58.000
informative for you, and I'd like to thank you for viewing.
