Getting started with Ansible 01 - Introduction

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right all right all right you guys win i'll do an ansible series you know this series was the most asked about tutorial series for a while and it's something that i've been wanting to do but i just never could get any time to create this series but finally i had some time to sit down draft this series come up with an outline that i think works and here we are i'm actually doing the ansible series after all this time of you guys asking me over and over again for it i'm so happy to finally have a chance to do this for you guys now as i thought about how to do this series i wanted to basically make sure that i portray ansible in a way that makes sense and when i was first starting with ansible i was kind of confused i didn't know how to get started and it was just so confusing trying to understand all the best practices so what i've decided to do was go ahead and show you ansible the way that i wish somebody showed me when i just got started or when i first started with it and i think that the outline in this series is going to achieve that so what i'm going to do right now is give you guys a few notes about getting started how this series is going to flow and the scenario that i've come up with that is going to serve as the theme for the rest of the series let's go ahead and check it out for the most part the purpose of ansible is to provision servers now here i have three servers i didn't actually give them a purpose just names server one server two and server three wasn't feeling very creative but the idea is that we want to provision our servers we don't want to have to do manual work to spin them up we basically want to automate as much as we possibly can and that's exactly what ansible allows us to do so it's kind of arbitrary how many servers you have you could have 500 servers in your fleet or maybe just three like we do right here so the number doesn't really matter now what's missing from this picture right here is ansible we have these three servers but where does ansible fit now most of the time you have an ansible control host which is basically just another word for an ansible server essentially the ansible server or control host will connect to the three servers in this case or however many you have to issue commands to provision it now the three servers they don't actually have to have ansible installed so there's no ansible installed here or here or here we only have ansible on the control host and then the sensible server will make connections via ssh to the servers to go ahead and provision them but the most confusing thing for me when i first started with ansible is that there was never any guide that i had at that time that really spelled this out for me and i had to find all of this on my own and what i found out is that there is no one way to set up ansible ansible i like to give the equation that it's like someone dumping a bunch of legos in your lap and they tell you to build it however you want now obviously with ansible there are best practices there are things that you want to make sure that you do there are efficient ways to do things in inefficient ways to do things but there is no one right way to do things so you don't actually have to have an ansible control host or an ansible server there's an alternate scenario and this is the scenario that we are going to go along with in this series and that's this scenario right here now here instead of having an ansible control host we have my laptop we have a workstation and essentially what it's going to be is this laptop is going to contain the scripts or the playbooks that are going to be used to run ansible against the servers everything is going to happen from this laptop now it could be a desktop it doesn't really matter because one way that this works in the real world is you could have a git repository and inside that get repository is all of your ansible playbooks and let's just say you have other people that work with you other administrators they need to be able to download that repository to also be able to run the playbooks against the servers and usually in its shops nowadays all of this is collaborative you have one person who will make changes the other admins will download those changes and also be able to run them and that's essentially what we're going to do here again we have this laptop right here so i just named it jay's laptop this is going to have the playbooks on there and they're going to be stored in git and that's important because if something ever happens to this laptop maybe it crashes hard drive dies something like that then all of those ansible playbooks will go along with it and die too we don't want that having everything in git means that we're reasonably protected from things like that but it also means that we can work collaboratively with other people on our team to benefit from the version control nature of git along with the power of ansible now in my case i've created three vms to simulate this i have for example ubuntu 2004 one then ubuntu 2042 and then ubuntu 2004 iii now normally i don't like to use virtual machines on my channel because i like to show you guys everything from the bare metal but when it comes to teaching you ansible i think this scenario works for vms just fine so we're going to go ahead and configure these vms with ansible and then we're going to do so from another vm that i am calling my workstation vm which will simulate your laptop or desktop and then we're going to go ahead and use that to run all the commands against these three servers and i'll take you through all of the basics like installing packages creating users all the way up to actually creating roles as well so you'll learn everything you need to know to be productive with ansible in this series and that's basically the outline that we're going to follow first i'm going to show you guys how to use ssh keys to authenticate to your servers that's important to know i'm also going to show you how to create a git repository pull that down make changes and push it back up to master then i'm going to show you how to install ansible and then from there we're going to get deeper and deeper into the world of ansible until you guys know enough to be productive now the first set of videos should already be up on my channel if i don't already have all of them by now by the time you are watching this so go ahead and click on over to the second video and let's get started you
Info
Channel: LearnLinuxTV
Views: 55,020
Rating: undefined out of 5
Keywords: Tutorial, Learn Linux, ansible, ansible tutorial, templates, ansible templates, devops, ansible tutorial for beginners, infrastructure as code, devops tools, ansible playbook, devops tutorial, getting started with ansible, ansible automation, ansible for beginners, ansible playbook tutorial, ansible 101, ansible training, learn ansible, ansible training for beginners, ansible training videos, redhat, linux, linux tutorial, ansible roles, ansible overview, devops training
Id: 3RiVKs8GHYQ
Channel Id: undefined
Length: 7min 42sec (462 seconds)
Published: Fri Jul 31 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.