1 00:00:00,720 --> 00:00:08,400 Previously, we created a playbook to check the connectivity of your local host or the host. 2 00:00:08,480 --> 00:00:10,890 We were running Ansible software. 3 00:00:11,190 --> 00:00:18,480 Now we will do the exact same thing, except we will check the connectivity of our remote client or 4 00:00:18,480 --> 00:00:23,910 anything that is inside of our host file, the inventory list. 5 00:00:24,480 --> 00:00:24,870 All right. 6 00:00:24,870 --> 00:00:26,280 So it's just that simple. 7 00:00:26,280 --> 00:00:34,370 We'll become route, go to our Ansible playbooks and we will create a new YAML file client status. 8 00:00:34,380 --> 00:00:41,850 And here is the list of things that we will write it down inside of our client status YAML file. 9 00:00:41,850 --> 00:00:51,450 If you notice, this looks very similar to what we had or created a playbook when we wanted to check 10 00:00:51,450 --> 00:00:54,290 the client connectivity of our local host. 11 00:00:54,300 --> 00:00:57,330 The only difference that you probably notice is right here. 12 00:00:57,570 --> 00:01:08,400 The host is here, all which is indicating that all the hosts inside of ETSI Ansible host file should 13 00:01:08,400 --> 00:01:16,680 be part of this Ansible playbook or this Aspa playbook should be executed on all of those remote clients. 14 00:01:17,100 --> 00:01:20,040 This task is the same name is the same. 15 00:01:20,040 --> 00:01:25,650 The module that we are using is the same, and of course the command that we will use is the same as 16 00:01:25,680 --> 00:01:30,690 well to run that playbook, which is Ansible playbook and the name of that playbook. 17 00:01:30,870 --> 00:01:38,550 So we'll go to our Linux machine, which is our control node. 18 00:01:40,440 --> 00:01:50,100 Logging route to let's clear the screen and we'll go to our at C Ansible Playbooks directory here in 19 00:01:50,100 --> 00:01:52,350 the playbooks we already have. 20 00:01:53,750 --> 00:01:55,220 A connectivity. 21 00:01:56,060 --> 00:02:01,420 The playbook that we created, which if you remember, which is the first YAML file. 22 00:02:01,430 --> 00:02:07,430 So if you do more on first yaml file, this is the one that we created for a local host. 23 00:02:07,430 --> 00:02:17,210 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 24 00:02:17,960 --> 00:02:19,850 status dot yaml. 25 00:02:20,600 --> 00:02:30,650 All right, now we will edit that new playbook and we will leave everything as is except will change 26 00:02:30,650 --> 00:02:31,370 the name. 27 00:02:32,310 --> 00:02:32,910 Oops. 28 00:02:35,590 --> 00:02:37,450 To my first playbook. 29 00:02:38,250 --> 00:02:40,170 They will change that to. 30 00:02:41,960 --> 00:02:42,770 Check. 31 00:02:43,430 --> 00:02:46,700 Remote clients connect. 32 00:02:48,010 --> 00:02:48,790 Activity. 33 00:02:48,790 --> 00:02:49,630 All right. 34 00:02:49,930 --> 00:02:52,420 And we will change from local host. 35 00:02:53,150 --> 00:02:56,990 To all the tasks. 36 00:02:57,830 --> 00:02:59,660 The name of the task is the same. 37 00:02:59,660 --> 00:03:02,260 The module is the same, nothing changed. 38 00:03:02,270 --> 00:03:11,000 So let's save it and let's run it real quickly and we'll finish this lecture real quick so we can move 39 00:03:11,000 --> 00:03:15,800 to the more complicated playbooks in the next lecture. 40 00:03:15,800 --> 00:03:21,140 So let's run Ansible Playbook, client status, dash, yaml and enter. 41 00:03:23,360 --> 00:03:25,160 Right here is the name of our playbook. 42 00:03:25,190 --> 00:03:28,310 Check remote client connectivity, which is right here. 43 00:03:28,490 --> 00:03:37,340 It's running against all which is going to see Ansible host file and it found only one IP address and 44 00:03:37,340 --> 00:03:39,950 that is ten 250 31115. 45 00:03:40,220 --> 00:03:41,020 Okay. 46 00:03:41,090 --> 00:03:49,430 The test connectivity is okay and the result came back okay and it's showing that it pinged that client 47 00:03:49,430 --> 00:03:56,090 and it's able if you shut down your one second right here. 48 00:03:56,090 --> 00:03:57,650 If you shut down. 49 00:03:58,990 --> 00:04:00,550 Your client, which is right here. 50 00:04:00,550 --> 00:04:01,720 This is your client. 51 00:04:02,290 --> 00:04:08,180 If I power this off right now and run this playbook, then it will fail. 52 00:04:08,200 --> 00:04:12,850 I mean, the playbook would run, but the test would come back as fail. 53 00:04:13,420 --> 00:04:13,750 All right. 54 00:04:13,750 --> 00:04:19,000 So this is your first playbook to execute against our remote clients.