What is Ansible Part II: Simplicity, YAML, Push Model, Custom Modules

Gourav Shah
A free video tutorial from Gourav Shah
Premium Instructor| 35k+ students| Devops Trainer and Author
4.1 instructor rating • 14 courses • 41,220 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] In the previous lesson I began with Why do we need an symbol in this one. I'm going to start by listing the five key features of an apple and then start talking about the first one that is simplicity. So we are going to talk about batteries included infrastructure as a code features a fanciful code versus data templating that is and I'd importance as we go along in the next videos. Let us begin with simplicity. Now if you want to summarize what animal is you can just refer to this code by Alan key. It says simple things should be simple complex should be possible and that perfectly defines what animal stands for. And it is simple to learn simple to set up. Also the third part that I've just recently added is simple to extend. Let's talk about each of these pointers now talking about simple to learn and simple uses a language called as yet another markup language which has gotten really really popular recently because if you look at a lot of automation tools including let's say Cuban areas or Docker they also use the similar language the common language for various automation code and now that we are consolidated in the DB office where we are consolidating the tools including animal cabinet is Docker. Yammer becomes essential thing to learn anyways and the best part about the ammo it is human readable it is like writing some English sentences using a certain syntax and this syntax is something you can very well learn most of the essential part of it. Within less than an hour and you know if you look at danceable code on the left hand side in this box here you can pretty much understand what it does so it is you don't need any additional documentation to explain the code that you have read and it is a self documented code and it's not only as I mentioned earlier it's normal human readable It is also machine readable. So it is you know it can be translated into the language that the machines can understand as well. So one of the common questions that I get is do I need to learn python to know animal because animal itself is written in Python. The answer to that is no because it's the animal that you learn most of the time not Python. The second part of simplicity is the agent. Last hour the push model that danceable follows. Now if you come from the puppet or chef world were under as you would know about the pull more that it follows whereas and sensible uses a simple push model. The good part about this is you do not need an agent installed on any of your managed nodes it typically works with the existing transport mechanism which is mostly available on every system that is so such and it just connects using it to on Linux based machine or Unix based machines rather and using when am on Windows based machines and able to support Windows management as well. So it is simple to setup. There is nothing to install on the client side and it's very easy to get started and it is secure in a way that as such has been there it has been battle hardened and it's been used you know for for long term whereas you know if you write your own mechanism you write your own agents it is your responsibility to maintain and manage and patch from the security point of view as well. And this are typical push versus pull model where in case of push you have let's say one answer controller which is going to push to all the servers the configuration that we're talking about here using either SSL. Are they not in case I've put in more pull model you need agents running on every node which are then responsible to connect to the master and then pull this configuration. Now pull model in certain cases is more flexible but push model it's simple it is agent less and it is the mode which is getting really really popular with the whole application configurations now going away to Docker based you know software delivery the third part of our about Bill and this is something I really like about Anibal is if you want to extend danceable let's say you want to write your custom modules modules is a V and Siebel manages your system entities and if you look at most of the models they're even though they're written in Python you want to customize or write your own it is not mandatory to write it in Python you can use any language of your choice and it would just fit in properly that's absolutely possible. In fact you can write a shell script and convert that into a model very easily and that's a feature that is that I know of coming from the puppet and fold where if you have to extend anything write your own custom resources in puppet and chef you the only way to do that is by learning Ruby whereas animal gives you the flexibility to extend the code extend the animal's modules and write your own using any language of your choice. So it is the simplicity that we talked about simple to learn simple to set up and simple to extend that is the first key feature that I talked about in the next one I'm going to talk about the batteries included approach of sensible.