WEBVTT

1
00:00.000 --> 00:04.000
Now in the previous video we just mentioned the importance of the Ansible In

2
00:04.000 --> 00:04.800
ventory,

3
00:04.800 --> 00:09.040
so it does make sense that we look at it in a little bit more detail and what

4
00:09.040 --> 00:09.520
we're going to do

5
00:09.520 --> 00:14.170
is to actually create an Ansible Inventory file, not just this though, we also

6
00:14.170 --> 00:15.360
have another very

7
00:15.360 --> 00:20.900
important consideration and this is the creation of our Ansible Configuration

8
00:20.900 --> 00:21.840
file, this is our

9
00:21.840 --> 00:28.840
Ansible.cfg file, so we mentioned what the inventory was, what on earth is this

10
00:28.840 --> 00:30.880
one then? Well as always,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

10
00:28.840 --> 00:30.880
one then? Well as always,

11
00:30.880 --> 00:34.390
what I like to do is to briefly go to the documentation, there we can get the

12
00:34.390 --> 00:35.760
information directly,

13
00:35.760 --> 00:40.240
so let's just open up a browser and do just that. So if you just search for Ans

14
00:40.240 --> 00:41.200
ible Configuration

15
00:41.200 --> 00:45.320
file, let's go down to this one right here, Ansible Configuration Settings. Now

16
00:45.320 --> 00:46.000
what it says here

17
00:46.000 --> 00:49.680
is that Ansible is going to support several sources for configuring its

18
00:49.680 --> 00:51.200
behavior, including an

19
00:51.200 --> 00:56.370
I and I file known as Ansible.cfg. Now quite simply, there is an order of

20
00:56.370 --> 00:57.760
operations to actually

21
00:57.760 --> 01:01.310
follow here. What we're actually seeing here are four different locations
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

21
00:57.760 --> 01:01.310
follow here. What we're actually seeing here are four different locations

22
01:01.310 --> 01:02.480
whereby we can specify

23
01:02.480 --> 01:06.840
this particular file. Now by default, you're going to have this particular file

24
01:06.840 --> 01:08.160
within the essay

25
01:08.160 --> 01:12.480
Ansible directory. However, that will be superseded if you happen to define an

26
01:12.480 --> 01:14.000
Ansible Cfg file in

27
01:14.000 --> 01:19.340
your home directory, which again will be superseded if you have an Ansible.cfg

28
01:19.340 --> 01:20.480
in the current directory

29
01:20.480 --> 01:25.130
that you happen to be working from. And that also can be superseded with an Ans

30
01:25.130 --> 01:26.560
ible_Config

31
01:26.560 --> 01:30.320
environment variable. Now if you want to see a sample configuration file that
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

31
01:26.560 --> 01:30.320
environment variable. Now if you want to see a sample configuration file that

32
01:30.320 --> 01:31.040
has all of the

33
01:31.040 --> 01:35.190
available options, then you can run this particular command once you have Ans

34
01:35.190 --> 01:36.640
ible installed. But in my

35
01:36.640 --> 01:40.440
case here, it's going to be a fairly simple file, so I'll just skip over and

36
01:40.440 --> 01:41.920
just generate my own.

37
01:41.920 --> 01:46.880
So first things first, if I go back to my directory here, all I'm on right here

38
01:46.880 --> 01:48.080
is an Ubuntu Linux

39
01:48.080 --> 01:51.370
machine and this is going to act as my Ansible control mode. This is where the

40
01:51.370 --> 01:52.240
automation is going

41
01:52.240 --> 01:56.200
to happen and this is where Ansible is going to be installed. So with that said

42
01:56.200 --> 01:57.280
, let's go and

43
01:57.280 --> 02:01.690
first install Ansible. Now the way we can actually do this on Ubuntu is if I
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

43
01:57.280 --> 02:01.690
first install Ansible. Now the way we can actually do this on Ubuntu is if I

44
02:01.690 --> 02:03.920
say pseudo-apt install

45
02:03.920 --> 02:08.560
Ansible and hit Enter, I'm going to have to type in my administrator password

46
02:08.560 --> 02:09.680
and enter the game.

47
02:09.680 --> 02:14.370
And then I'll say why and finally enter once more, give this a moment or two to

48
02:14.370 --> 02:15.200
complete. And then

49
02:15.200 --> 02:18.790
eventually you will have Ansible installed on your system, which as we can see

50
02:18.790 --> 02:19.840
right here, if I say

51
02:19.840 --> 02:24.500
Ansible-dash version, and to enter, we clearly have Ansible now installed. So

52
02:24.500 --> 02:25.360
in order to begin

53
02:25.360 --> 02:29.570
automation, what I'm going to do to keep things nice and neat is to create my

54
02:29.570 --> 02:30.880
own little folder.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

54
02:29.570 --> 02:30.880
own little folder.

55
02:30.880 --> 02:35.000
So to do this on Linux, I will say MKDAR to make it directory, i.e. make a

56
02:35.000 --> 02:36.000
folder. And now I'll just

57
02:36.000 --> 02:40.080
specify the name of the folder that I want to create. Let's just call this Ans

58
02:40.080 --> 02:41.680
ible-automation. The name

59
02:41.680 --> 02:45.900
itself doesn't ask the matter, you can choose anything you wish. And if I say

60
02:45.900 --> 02:47.280
CD Ansible-automation,

61
02:47.280 --> 02:51.320
this will allow me to change directories and go inside of that folder, okay? So

62
02:51.320 --> 02:52.160
this is where I'm going

63
02:52.160 --> 02:56.260
to actually be working from within this particular folder. Now if I list the

64
02:56.260 --> 02:57.440
contents of this directory

65
02:57.440 --> 03:01.280
by saying LS, we can see there is nothing here. So what I'm first going to do
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

65
02:57.440 --> 03:01.280
by saying LS, we can see there is nothing here. So what I'm first going to do

66
03:01.280 --> 03:02.560
is I'm going to create a

67
03:02.560 --> 03:05.760
file and I can do this by saying touch and then the name of the file. Now

68
03:05.760 --> 03:07.200
remember, the file is going to be

69
03:07.200 --> 03:11.110
called Ansible.CFG. This is actually convention we want to use. It's what Ans

70
03:11.110 --> 03:12.640
ible is going to look for.

71
03:12.640 --> 03:16.930
And if I do a listing now, we can see we now have this particular file in this

72
03:16.930 --> 03:18.000
directory structure,

73
03:18.000 --> 03:21.970
albeit it is an empty file at the moment. Now what I'm also going to do is

74
03:21.970 --> 03:23.360
within the same directory,

75
03:23.360 --> 03:27.940
I'm going to create this inventory files. If I just say touch inventory dot i

76
03:27.940 --> 03:28.640
and i because this

77
03:28.640 --> 03:33.120
is going to be in the i and i format, albeit like I say, if you so wish, you
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

77
03:28.640 --> 03:33.120
is going to be in the i and i format, albeit like I say, if you so wish, you

78
03:33.120 --> 03:34.960
can create a YAML file,

79
03:34.960 --> 03:39.260
but for simple directories or rather for simple topologies, I just prefer to

80
03:39.260 --> 03:40.160
use i and i. So this is

81
03:40.160 --> 03:44.050
what we'll use. So real list the contents of this directory. Now we see we have

82
03:44.050 --> 03:45.680
two particular files.

83
03:45.680 --> 03:49.800
Let's first go into the Ansible.CFG file. So let me just open this file up

84
03:49.800 --> 03:51.360
right here. Now within

85
03:51.360 --> 03:54.960
square brackets at the top, I'm going to have this directive called defaults.

86
03:54.960 --> 03:55.600
This is going to

87
03:55.600 --> 03:59.440
allow me to specify some default settings. So with this now done, what I'm

88
03:59.440 --> 04:01.520
going to say is gathering
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

88
03:59.440 --> 04:01.520
going to say is gathering

89
04:01.520 --> 04:05.440
is equal to explicit. And what this is going to do is going to prevent Ansible

90
04:05.440 --> 04:06.720
from trying to learn

91
04:06.720 --> 04:10.640
all this information about all my devices every time it happens to run. It's

92
04:10.640 --> 04:11.760
just unnecessary and

93
04:11.760 --> 04:15.550
it's going to take up too much time. So this will effectively turn this off

94
04:15.550 --> 04:17.280
unless I explicitly

95
04:17.280 --> 04:21.830
tell Ansible to go fat gathering. Next, I'm going to specify the name of my

96
04:21.830 --> 04:23.280
inventory. So I'll say

97
04:23.280 --> 04:26.670
the inventory is equal to now what was the name of the file I just created.

98
04:26.670 --> 04:27.600
Well, it was called

99
04:27.600 --> 04:31.370
inventory dot ionized. So this is what I'll specify right here. Now what I will
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

99
04:27.600 --> 04:31.370
inventory dot ionized. So this is what I'll specify right here. Now what I will

100
04:31.370 --> 04:32.400
now say is host

101
04:32.400 --> 04:35.720
underscore key underscore checking is equal to false pretty much. We're not

102
04:35.720 --> 04:37.440
going to worry about ssh key

103
04:37.440 --> 04:41.240
checking. Basically because it's a lab environment and it's not really

104
04:41.240 --> 04:43.200
necessary. So the next thing I will

105
04:43.200 --> 04:48.190
do is after I've specified my default settings, what I now want to do is to

106
04:48.190 --> 04:49.600
specify how I'm going to

107
04:49.600 --> 04:54.070
be connecting to my devices. So I'll say persistent underscore connection. And

108
04:54.070 --> 04:54.720
it will be helpful if I

109
04:54.720 --> 04:59.070
could not match the keypad. Try that again. So persistent underscore connection

110
04:59.070 --> 05:00.240
. And inside of here,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

110
04:59.070 --> 05:00.240
. And inside of here,

111
05:00.240 --> 05:04.890
I will say ssh underscore type and the configuration value is going to be param

112
05:04.890 --> 05:06.240
. All param.

113
05:06.240 --> 05:10.420
Ego is as an ssh Python library that Ansible can use to establish the

114
05:10.420 --> 05:13.200
connection to my devices over ssh.

115
05:13.200 --> 05:18.490
So if I just save this right here, this is going to be my Ansible dot CFG file

116
05:18.490 --> 05:19.360
with this now done.

117
05:19.520 --> 05:23.010
What I want to do is I want to create my inventory file. Okay. So if I just go

118
05:23.010 --> 05:23.600
back to my

119
05:23.600 --> 05:26.890
topology right here, if I go to one of my devices here and just open up a

120
05:26.890 --> 05:28.480
terminal, what I'm going to

121
05:28.480 --> 05:33.460
do is to configure my device to accept some basic connectivity over ssh. So I
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

121
05:28.480 --> 05:33.460
do is to configure my device to accept some basic connectivity over ssh. So I

122
05:33.460 --> 05:35.360
'll go into enable modes.

123
05:35.360 --> 05:39.050
I'll then say configure terminal to go into global config so I can make changes

124
05:39.050 --> 05:40.080
. I will then give

125
05:40.080 --> 05:44.320
the device a host name and let's just call this one s1. I'll then give it an IP

126
05:44.320 --> 05:45.200
domain name,

127
05:45.200 --> 05:49.320
just also IP domain name and give it off Cisco dot com. I'll then say the user

128
05:49.320 --> 05:50.560
name to login will be

129
05:50.560 --> 05:56.200
admin. The privilege will be 15 and the password will be let's go with admin

130
05:56.200 --> 05:59.360
pass. Okay. Now I'll turn on ssh by

131
05:59.360 --> 06:03.950
saying I PSSH version two and then I'll generate my cryptographic keys. So I'll
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

131
05:59.360 --> 06:03.950
saying I PSSH version two and then I'll generate my cryptographic keys. So I'll

132
06:03.950 --> 06:06.480
say cryptok he generates RSA

133
06:06.480 --> 06:12.310
with a modulus of one, oh, two, four. And now I'll say line VTY zero to four.

134
06:12.310 --> 06:14.320
And then I'll say transport

135
06:14.320 --> 06:19.750
input ssh and then I'll say log in local to use the local credentials with this

136
06:19.750 --> 06:21.040
now done. I'll then go

137
06:21.040 --> 06:24.330
on to the interface for that device. So in my case here, I'm going to be

138
06:24.330 --> 06:26.320
connecting over eth zero zero,

139
06:26.320 --> 06:30.980
which is this one right here. So in eth zero zero, I will say no switch port,
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

139
06:26.320 --> 06:30.980
which is this one right here. So in eth zero zero, I will say no switch port,

140
06:30.980 --> 06:33.360
no shutdown. And now

141
06:33.360 --> 06:36.810
give it an IP address, I'll say IP address and I'll give it an address within

142
06:36.810 --> 06:37.840
my local network. So

143
06:37.840 --> 06:42.130
I'll do one, nine to one six eight one dot one, one and give it a slash 24 mask

144
06:42.130 --> 06:43.760
. So what's this now done?

145
06:43.760 --> 06:47.440
What I should be able to do is from my Ubuntu machine, which if I go back here,

146
06:47.440 --> 06:48.560
we can see this is

147
06:48.560 --> 06:52.770
over here, because this is on my local network, I should be able to log in via

148
06:52.770 --> 06:54.160
ssh to this particular

149
06:54.160 --> 06:57.680
device. So first things first, let's try to ping the device by saying ping one

150
06:57.680 --> 06:58.560
nine to one six eight

151
06:58.560 --> 07:02.420
one dot one on one, which is IP address. We're getting a response. Let's press
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

151
06:58.560 --> 07:02.420
one dot one on one, which is IP address. We're getting a response. Let's press

152
07:02.420 --> 07:03.520
control C to stop this.

153
07:04.240 --> 07:08.610
And now also ssh, tap the username of admin and then give that IP address again

154
07:08.610 --> 07:10.000
. So one nine to one six

155
07:10.000 --> 07:14.490
eight one dot one, one. So if I hit enter, what I will now do is say yes to

156
07:14.490 --> 07:16.080
accept the fingerprint.

157
07:16.080 --> 07:20.080
And now if I tap in the password of admin pass, as we can see, I can now

158
07:20.080 --> 07:22.800
connect to my device over ssh,

159
07:22.800 --> 07:27.360
which means I can now use Ansible on this Linux machine to manage that device.

160
07:27.360 --> 07:28.160
So all I will do very,

161
07:28.160 --> 07:31.980
very briefly is able to do the same configurations for the remaining three
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

161
07:28.160 --> 07:31.980
very briefly is able to do the same configurations for the remaining three

162
07:31.980 --> 07:33.440
devices s two s three and

163
07:33.440 --> 07:37.350
s four, giving this the IP address of one or two. This will be one or three and

164
07:37.350 --> 07:38.240
this will be one

165
07:38.240 --> 07:41.600
or four. So in the interest of time, let me just pause this video and do just

166
07:41.600 --> 07:42.560
that. So with this

167
07:42.560 --> 07:46.110
now configured, I should be able to log in to device number two, which I can

168
07:46.110 --> 07:47.360
just type in the password.

169
07:47.360 --> 07:54.080
There we go. Arle up device three, accept the fingerprint, type in admin pass

170
07:54.080 --> 07:54.640
password, and

171
07:54.640 --> 08:00.850
lastly device number four, accept the fingerprint. Admin pass and to enter, as
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

171
07:54.640 --> 08:00.850
lastly device number four, accept the fingerprint. Admin pass and to enter, as

172
08:00.850 --> 08:01.440
we can see, we're

173
08:01.440 --> 08:06.210
able to log in. So with this information here, we want to pass it all into this

174
08:06.210 --> 08:07.200
particular file,

175
08:07.200 --> 08:10.890
the inventory dot I and I file. So let's open this one up now. Now if you want

176
08:10.890 --> 08:12.160
to see more examples,

177
08:12.160 --> 08:16.220
what you can do is Google for Ansible inventory, click this link right here.

178
08:16.220 --> 08:16.720
And what we're going to

179
08:16.720 --> 08:20.880
see here is some examples of being able to create and build out this inventory.

180
08:20.880 --> 08:21.840
This example is

181
08:21.840 --> 08:25.930
showing an Ansible inventory in the I and I format. Ultimately, these square

182
08:25.930 --> 08:27.040
brackets are allowing us

183
08:27.040 --> 08:30.680
to specify groups and below. These are the members of the group. So in this
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

183
08:27.040 --> 08:30.680
to specify groups and below. These are the members of the group. So in this

184
08:30.680 --> 08:32.000
case here, we're using

185
08:32.000 --> 08:36.000
the DNS names as opposed to IP addresses. But if you so wish, you can't use the

186
08:36.000 --> 08:36.800
IP addresses

187
08:36.800 --> 08:40.930
directly. Similarly, this is the same type of thing. This time though, this is

188
08:40.930 --> 08:41.920
just specifying the

189
08:41.920 --> 08:45.860
inventory in YAML format. So there's a great emphasis on indentation, as we can

190
08:45.860 --> 08:46.800
see right here.

191
08:46.800 --> 08:50.730
Now, first thing to note about Ansible is that the inventory is automatically

192
08:50.730 --> 08:51.680
going to create

193
08:51.680 --> 08:56.850
two default groups. This is the all group and the ungrouped group. Okay. Bit of

194
08:56.850 --> 08:57.920
a mouthful. But

195
08:57.920 --> 09:02.910
basically, the all group is going to automatically infer every single host that
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

195
08:57.920 --> 09:02.910
basically, the all group is going to automatically infer every single host that

196
09:02.910 --> 09:04.640
you have in your inventory

197
09:04.640 --> 09:08.940
file. So pretty much if you tell Ansible within a playbook to target the all

198
09:08.940 --> 09:10.240
group that Ansible knows

199
09:10.240 --> 09:14.170
hey, every single file or rather every single device in that inventory file, I

200
09:14.170 --> 09:15.280
'm going to connect to

201
09:15.280 --> 09:20.120
it and do whatever the task that the playbook specifies. Similarly, this un

202
09:20.120 --> 09:21.120
grouped group,

203
09:21.120 --> 09:25.520
this is going to contain all the hosts that don't have another group aside from

204
09:25.520 --> 09:26.960
its default membership

205
09:26.960 --> 09:30.830
to the all group. Okay. So as we can see here, by default, every single host
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

205
09:26.960 --> 09:30.830
to the all group. Okay. So as we can see here, by default, every single host

206
09:30.830 --> 09:31.840
will always belong to

207
09:31.840 --> 09:35.290
at least two groups. Now, if you happen to read the documentation, you can

208
09:35.290 --> 09:36.640
learn that Ansible allows

209
09:36.640 --> 09:39.900
you to have hosts in multiple groups. And there is an order of precedence to

210
09:39.900 --> 09:41.280
work through as to resolve

211
09:41.280 --> 09:45.530
particular conflicts. For our case right here, let's keep it simple. Let's just

212
09:45.530 --> 09:46.480
stick with a basic

213
09:46.480 --> 09:49.840
inventory and we'll use the most simple format, the I and I format. Okay. So

214
09:49.840 --> 09:50.880
let's just go and write

215
09:50.880 --> 09:54.770
out the configs that we just saw there. Okay. So here's the thing. The way we

216
09:54.770 --> 09:56.480
actually specify a group

217
09:56.480 --> 10:00.440
is entirely up to you. However, makes sense to you is perfectly fine. Maybe you
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

217
09:56.480 --> 10:00.440
is entirely up to you. However, makes sense to you is perfectly fine. Maybe you

218
10:00.440 --> 10:01.520
want to create groups

219
10:01.520 --> 10:05.410
by device type, you know, like every device in my network or let's maybe say

220
10:05.410 --> 10:06.720
half of my devices are

221
10:06.720 --> 10:11.470
Cisco devices, the other half are Juniper devices. Maybe you want to specify

222
10:11.470 --> 10:12.560
that in a group so you

223
10:12.560 --> 10:17.130
can logically target particular devices. Then you can do just that or maybe you

224
10:17.130 --> 10:18.160
want to group things

225
10:18.160 --> 10:21.770
up via location, you know, somewhere in Europe, somewhere in the USA, that type

226
10:21.770 --> 10:23.280
of thing once again,

227
10:23.280 --> 10:27.090
entirely up to you. Some people lead to group things by function. So maybe you

228
10:27.090 --> 10:27.920
've got particular

229
10:27.920 --> 10:30.910
devices and the core of the network. Maybe you've got devices and the
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

229
10:27.920 --> 10:30.910
devices and the core of the network. Maybe you've got devices and the

230
10:30.910 --> 10:32.240
distribution portion of the

231
10:32.240 --> 10:35.590
network. And then maybe you've got devices and the access portion of the

232
10:35.590 --> 10:37.040
network. Again, there is

233
10:37.040 --> 10:41.660
no right or wrong answer. This design is up to you. In my case here, what I'm

234
10:41.660 --> 10:42.880
going to do is I'm going

235
10:42.880 --> 10:47.080
to have a group called Cisco, which is basically going to target every device

236
10:47.080 --> 10:48.320
that I have so far because

237
10:48.320 --> 10:52.890
right now in my network, I only have four Cisco devices. But what I will also

238
10:52.890 --> 10:54.320
do is I'll also subdivide

239
10:54.320 --> 11:00.160
this into a USA group as well as well as a UK group. So basically I've got four
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

239
10:54.320 --> 11:00.160
this into a USA group as well as well as a UK group. So basically I've got four

240
11:00.160 --> 11:01.280
devices. They're all

241
11:01.280 --> 11:06.030
Cisco devices to them in the UK and the other two are in the USA. So let's go

242
11:06.030 --> 11:07.520
and write this out then.

243
11:07.520 --> 11:12.180
So at the very top, I'll have a group and I'll just say in brackets Cisco. Now

244
11:12.180 --> 11:12.960
what I will do here is

245
11:12.960 --> 11:20.080
I'll just give a shorthand name. I will say S1, S2, S3 and S4. Now because this

246
11:20.080 --> 11:21.600
is the first time I am

247
11:21.600 --> 11:27.280
referencing these particular keywords S1, S2, S3, S4, I also want to associate

248
11:27.280 --> 11:29.040
them with their IP address

249
11:29.040 --> 11:32.830
because I don't actually have DNS resolution at play right now. So what I will
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

249
11:29.040 --> 11:32.830
because I don't actually have DNS resolution at play right now. So what I will

250
11:32.830 --> 11:33.680
say here is

251
11:33.680 --> 11:38.850
Ansible_host is equal to and then I'll type in IP address of the first device

252
11:38.850 --> 11:40.560
which is 192, 168,

253
11:40.560 --> 11:45.040
1.101 and then just do the same for the remaining ones. Okay, so S2 is going to

254
11:45.040 --> 11:46.880
correspond to like I say

255
11:46.880 --> 11:55.280
192, 168, 1.102 address and S3 will get 103 and S4 you guessed it's going to be

256
11:55.280 --> 11:57.040
104. So right now what

257
11:57.040 --> 12:02.200
I've got here is my Cisco group and let's now create my USA group. So if I just
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

257
11:57.040 --> 12:02.200
I've got here is my Cisco group and let's now create my USA group. So if I just

258
12:02.200 --> 12:02.800
go down,

259
12:02.800 --> 12:07.360
have my square brackets, I'll just see USA and now this time it's going to have

260
12:07.360 --> 12:09.280
devices S2 and S1.

261
12:09.280 --> 12:14.960
So all I will just do is say S1 and S2 and I no longer have to associate the IP

262
12:14.960 --> 12:15.520
addresses because

263
12:15.520 --> 12:19.720
it's already been inferred earlier on within the file. So what I can now do

264
12:19.720 --> 12:21.840
here is create my UK group

265
12:21.840 --> 12:27.970
and I can just say in the UK we've got S3 and we now have S4. So right now with

266
12:27.970 --> 12:28.960
an inventory all we've

267
12:28.960 --> 12:33.050
got is the connection details for the IP address and associating that with a
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

267
12:28.960 --> 12:33.050
got is the connection details for the IP address and associating that with a

268
12:33.050 --> 12:34.800
particular name. What I want

269
12:34.800 --> 12:39.440
to do is I want to pass in some particular values associated with this group

270
12:39.440 --> 12:40.720
membership within the

271
12:40.720 --> 12:45.110
inventory that is going to allow Ansible to find out what the login username is

272
12:45.110 --> 12:46.640
, the login password,

273
12:46.640 --> 12:50.910
as well as the actual device type that we're connecting to. So let's do that in

274
12:50.910 --> 12:52.800
the very next video.
