How to setup communication between Ansible Server and Client

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video we're gonna see how Ansel communicates with its blind note and what steps we have to execute in order to perform those we assume that the ansible is already installed in the end simple server so I have two system that is an N single server which is this one and an LC the point where we want to manage the things which will be a system okay chef not too right now let's see if that's felicity if you see I do have a nipple already installed and the current portion of ansible is stupid okay now what I need to do is that I have to communicate with my client sister if you see if I to a normal paint my client 64 feet I am able to get a pain but if I try to do anything Videl Sybil that is firing and uncivil at all command or a playbook I will not be able to lose all because there is no ssh connection established between ten civil server and if we see why our diagram says what exactly we have to do in order to execute any and all command from this over to the server or this we have to establish a sucessful action okay and few steps are mandatory in order to get that done now if we logically understand whenever we bring up engine Linux system that it BRL CentOS open to Suzanne the next we have a default user called rule which is the supreme user right we have a root user in this system we have a root user in this system we have a root user in this system but ansible says the best best practice is to execute ansible commands and the PlayBook is with a non root use this you can create any user and call it let it say n Sybil itself or Edwin M civil in our case what we gonna do is that so whatever NZ will related things become execute you're gonna create a user called s didn't okay in this system and then give it a some root privileges so it will be a normal user with sub root privileges okay the same thing you have to be in the client also because your ansible will execute some command as a saline user in an M in order to perform that in the client node it will require that you know that same user is available here otherwise it will not be able to do so okay it will not be able to connect the system and execute those command so that's why we create is chilling in this system in all the client if there are a hundred lines you have to do this first three steps in all the way then only you will be able to use your elgible further okay these are mine now assuming that you have created a still in user here here now your ansible and of commands is that you have installed some packages so obviously you will fire some atop command like a model yum and then package to install is su PD it gets connected because you have that user here you have the user here but it will fail to execute that install yum install httpd package because that requires you to privileges that's the reason when we it has recently had user to this VI saluto pipe so that these users will have some good privileges to do the same as it as root user okay simple so these are the steps which we have to carry forward or do it in all the system in n simple server as well as in this one so let's see the flow how we gonna do start one yet user still in okay HDD and be sure to do this if you are using ubuntu n Susi limits it may be for other system also but I know that into coupon to end Suzy Linux this has to be done whereas in ll CentOS you don't need that is create at - M - M is for me at home directly and - s with cell it should love it that is thin - otherwise by default it will get bins less SH said you will not be able to you will not be in the batch okay that now said the password for a silly I'm just giving a random password like had mean this is a dis gonna be my sensible server some I'm giving admin at the rate 1 2 3 done now I will add this user in the VI sudo file I might have to do that let's see who knows right yeah it's already see by default only this will be there only this way okay so you have to get into here press enter enter this exactly like this leave all privileges to this user and there should not be any password prompt that that is what this means now you write this come out of it SSH okay okay so this was already there if you see I've already done this so that's why it is there so I say overwrite yes it will overwrite it okay oh my go to any node so if we see the diagram we have done this right you have done it if we have done it now right so I'm going to make light okay then the user it CL am and I'll hit enter but I will not give - mm - s less business best because this is my CentOS system so I don't need those I'll set my password who maybe use a railroad because these are my final successfully done add this to the VIU profiles to add anything in the vs of the file you know you should have a root privileges so that is why I am doing with the root root user if you have any other user with a similar feel just like root then you can do sudo VI VI so boom like that I'll go to the bottom of the file see if that is so here also if you see I've already already added if you note if you just see root all equal to all all then you have to come down okay and then it said I hope II so you should know how we showed in the editor at the line and save it so that is them okay so step number one is done who is that now step number E will not be done on that line it has to be done from the south but in that exchange it so I will go back my power okay now I'll switch my as today okay okay so we did a mistake here that was like creating this SSH key we created for rude okay we generated the key for wood we don't leave the key for the need for esli so let's do it so as you mean that we have perform step number one and two in server step number one and two in the pipe now we are doing step number two assh generate the key now we exchanged yes and it will prompt for the password HT little head this system so the password which we want to type piece for a saline user at this system 14.4 okay so okay now let's see what I will do is that I will say sudo vim CPC host on the Tour de / horse justifying it which I will add okay so I've already added my IP address here this is my blind which I'm gonna manage from whence it also and I'll give a good name pest like a sensible test - them [Music] if you like this is how you communicate with [Music] [Music] [Music] [Applause] but inside here there's all the things you have to make sure if you fear the user here at it wasn't open then go back to your friend do you do this step number four here also numbers we find and [Music] that is these two steps and step is generate SSH the key so fifth step it's is that right so this is how
Info
Channel: AC
Views: 241
Rating: 5 out of 5
Keywords: How to setup communication between Ansible Server and Client, ansible
Id: m37DfiSZ-Ec
Channel Id: undefined
Length: 14min 45sec (885 seconds)
Published: Sun Mar 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.