Tour of Ansible Galaxy

Gourav Shah
A free video tutorial from Gourav Shah
Premium Instructor| 35k+ students| Devops Trainer and Author
4.1 instructor rating • 14 courses • 41,416 students

Learn more from the full course

Ultimate Ansible Bootcamp by School of Devops®

Unofficial Guide to EX407 Redhat Certified Specialist in Ansible Automation

07:32:45 of on-demand video • Updated July 2020

  • What is ansible, why its needed and how it works
  • How to configure ansible and setup static/dynamic inventories
  • Ad hoc server management, running jobs in parallel
  • Managing systems entities using ansible Modules
  • Writing Playbooks to define the state of infrastructure as a code
  • Creating modular, reusable code with Roles
  • Creating dynmic code with vars and templates
  • Using Ansible Galaxy
  • Encrypting sensitive data with Vault
  • Service Discovery and managing Multiple Environments
  • Application Deployment Strategies, Rolling Updates
English [Auto] All right so in this video I'm going to give you a quick dodol fanciful galaxy and we're also going to talk about what are the considerations that you make while choosing a good role. All right so this is Ajnabee galaxy and the Wizards will galaxy you go to Galaxy dot dot com. Now from here you can browse the rules of ellabella and search for the rules that you want. Let's begin by exploring the rules. You can also have an account and log in and this account is useful when you want to. Let's say I contribute by adding your own rules or you may want to you know give ratings to the existing rules et cetera. Right. Let's begin by exploring this. When you click on this explorer button it takes you to this page where you know you see these you know like commonly used drawers most watched most downloaded more start. Some of these are probably the best rules available as well because for example most downloaded are possibly the you know the best possibly written rules as well and these have like hundreds of thousands of downloads as well. These are the most Watros these are the ones which are being followed by other people for any updates. And there's a star rating for the rules as well. And these are the rules with the highest star ratings possibly the best trolls as well. We're actually will end up using one of this rule for setting up on my sequel. Going to use an other all from the same person for setting up a proxy that's our Lord balancer. You also see that Updike's this shows the popular the most popular tags are the most popular you know type of rules of A-level for let's say cloud database development systems and packaging and so on. One for Dr. D'Agata has been popular as well. These are the top contributors and these are the newest rules possible of it possibly available there. Right now if you look if you just click on one of Todd let's say we just click on the you know the more starred one. This is an example of how a role description would look like this or that description. The details that read me which will look at and this generally points to you know if this has been integrated with let's say Travis or this is Galaxie download kind to some stats statue from marble from there. And then we have the compatibility with danceable words. And this is compatible with anything that starts with ansible 2.2 on verts So it's a pretty recent version of ansible required here. If is one point text wasn't defensible. Some of the features may not work. That's what this means. How do you install this rule is what you see here. So you can use that to be Galaxie utility the same needly that we used for generating this Catford father role and he can use and so we've got to install the user name dot role. The Thaxter the history for this particular role. This has nothing to do with danceable Waldren. This is for this role watch and buy basically and it works on this platform that sama's on Linux and Linux on Linux is very similar to that I'd had said to us Linux. If you want to find more information about this you can also go and look at the read me now read me John tells you of what are the requirements. This is the history of this rule. And you know how the installer story updated what the features are a user. This is actually a very well documented rule. It also has a diagram explaining what it actually does. What are the variables. Variables are important because that's how you want to customize things. And these are all the variables that you see here. And how do we actually how does it actually deploy that. I believe this rule is used for deploying your applications right. And that's how it looks like. And if you want to find more information about the role of Bisley once you choose the role you're going to go to the get hub REPL for that role and then you know you're going to look at the actual code you'll see the same documentation that's the same read me there. And along with that you'll actually see that. So you can begin with that tasks and find out the way archiver say you go to the main argument and from there you're travelers. Because this is where you will find it. You know the condition. You know this is using variables to basically include other tasks and from there you can actually cover the YAML files and see what is actually happening at Watergate for example set up got the movie is adding some files sexually and so on. All right let's go back to that simple galaxy. We were trying to explore the rules. Now the thing that you could do is and that's what probably will do most commonly it's search for something that you are looking for. Let's say I'm looking for a role to set up mongered it is so I can just go and search for Mongo here. And that's my Mongar D-B let's say and you can look at the star ratings and filtered by the relevance filter by the author. Stargazers watchers downloads. You can also in effect download most downloads and I'm most honored it should be. One is older. They've been on the Galaxy for a while as well as it should be a well-written role as well. This is far less among D-B and if I want to choose this I could go and look at the read me find out if this is something I would really want to use. If my system is compatible with those that are available as given here and that's what I allow would allow me to customize things and then finally I would go and look at the get hub REPL as well. Now some of the things when you go in look choose your role as you should when you go to the get hub REPL one is you should look at how recent updates have been. And I see some updates 11 days ago and nine months ago. So some of the considerations that you want to make while choosing a good role is you know the number of commits how many contributors you have and how often this has been updated. So this shows me down 20 to 2018 which means that it's been updated pretty recently and it has recently actively developed a rule which is a good good thing to have been that that's what does that you know it's a good it's a good Johns's that it will work with my recent version as well and this is very documented as well. So some of the thing considerations that you make is one is the ratings number of downloads on Galaxy even you search for a particular role. You can filter by that click and also have additional filters and say that I want to make sure that it matches my particular platform or a particular author and so on and so forth or a particular cloud fact from let's say tablets and DC or something on those lines they were for. All right so you can fake them. If you have any specific requirements you can't start by number of downloads from number of you know star ratings Stargazers. So based on that you can arrive at our shortlist the rules and then you're going to look at the rules and look at the code look at the recent updates. Make sure it is compatible with your version of the operating system or other platform. And that's how you would pick the right role. And finally you should also look at the license because most of this is open source. But you want to make sure that when you use it inside your organization if you have organization I has any specific constraints about licensing you may want to check that. Now this is using MIT license which is a very liberal license actually. So should we should be good actually right so those are the considerations that you want to make. That's how you choose the right role for your views and once you have chosen the role you can just use animal galaxy to install it and then start using it and leveraging it into a playbook that it radically by adding some variables if you will to make changes too. And that's what we're going to look at in the next lessons.