What is Ansible and the Ansible Way?
Sprawling infrastructure and snowflake woes? Then Ansible is the solution you need!
Ansible is designed to be minimal in nature, consistent, secure and highly reliable! Ansible is a highly sought after skill in the marketplace with an extremely low learning curve for administrators, developers and IT managers.
The "Ansible Essentials: Simplicity in Automation Technical Overview" course introduces you to Ansible automation and configuration management, provisioning, deploying, and managing compute infrastructure across cloud, virtual, and physical environments.
By taking this course you'll learn just how easy it is to use Ansible to build consistent and repeatable infrastructure environments using Ansible playbooks.
In this video, we are going to discuss what Ansible is before we get into how Ansible works. So first, Ansible is an automation platform. We have the automation language which mixes up our Ansible playbooks, which is YAML, and then we have the engine itself which runs those playbooks. We also offer Ansible Tower which is a framework for managing your existing automation with a full UI and RESTful API, and then you will see that at the end of the training.
So what sets Ansible apart? So on this slide, I am saying that Ansible is simple. We are going to expect that your user base is going to be mixed with people of different skill levels and because of that, we want to make it incredibly easy to get started. The language playbooks are written in is very easy to read and those playbooks are going to work consistently across environments. And it's also extremely powerful in the sense that we can spin up hundreds if not thousands of nodes at any given time, which is largely due to the fact that Ansible is agentless. So there are no agents to keep up to date or that have to check back in to your control system and the requirements to install Ansible are minimal. So, that agentless support is not just Linux-exclusive, this is also going to apply to Windows machines, networking devices, and physical and cloud servers whether it's related to dynamic or static inventory.
And one of the main selling points of Ansible is that we work with existing tool kits, so you don't have to swap everything out for Ansible to start, you can homogenize over time. Ansible is also batteries included. So installing Ansible right now will currently net you over 450 modules, and those are going to range in type from the popular Cloud modules to the Packaging modules to the Database modules as well, and this slide right here is just showing kind of a high-level overview of the types of modules out there and we will talk a little bit more about those in a bit.
Ansible has an amazing community and I always like to draw attention to this, we have tons of contributors and active participants on IRC, and like I said in the previous slide, over 450 modules currently shipped with Ansible and that number is going to continue to grow with each passing release. So it's just a crazy number to think about, we are also getting over 250,000 downloads a month which is absolutely insane.
So one of the other bullet points that we highlight around Ansible is the fact that it's the complete package. So if you look at this graphic, it's not just configuration management, it's also orchestration, app deployment, and provisioning as well. And you can see here that there are tools that definitely perform one of these use cases but they can't do them all and that's really one of the big strengths of Ansible. So let's go into a little bit more detail about these high-level use cases.
So the use cases listed here are broad but they are definitely the most common that we see out in the field. So first, we have configuration management, and I like to call that state management because with Ansible we can enforce a baseline state for all of our servers to make sure that they have the right packages, the right configuration files, keys, services, users, etc. This is going to go in conjunction with security and compliance because we can build policies into our automation to make sure that everything is at the proper state.
Now, Ansible can also do deployment in which you are basically taking your custom code and then you are pushing that out to your servers. So this goes hand in hand with orchestration as our playbooks can ensure that we are targeting the correct servers in the correct order at any given time.
So Ansible is a full automation platform like we have mentioned, so that makes it easy to create a full CI/CD pipeline, as your playbooks, which we recommend that you maintain through some sort of source control mechanism, they can keep your applications properly deployed and managed and up-to-date. And finally, Ansible is going to excel at provisioning new servers, which means spinning up a new VM. So Ansible has modules for many of the cloud providers, which in case of Amazon we have over 50 EC2 modules alone.
So at this point, we have talked about what Ansible is, and some of the use cases that you can utilize with Ansible. So now how do we actually install Ansible and get started with it? And there are many methods available for you to choose from, including you can make your own RPM package, you can run from source, but you can just use a package manager which is the most common method of installation, and I have a few examples on this slide.
So first the most common and preferred way of installation is to grab the Ansible package directly from PyPI and with a pip install of Ansible. In fact, that's how I installed Ansible on my machine that I am using today. Second, if you are using a RHEL machine or CentOS, you can enable the EPEL repository and just do a yum install of Ansible, and third, if you are on a Debian machine you can enable the Ansible PPA and just do an apt-get to install Ansible.
And so that is the end of this video and in the next video, we are going to discuss how Ansible works.
Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.
Jeremy holds professional certifications for both the AWS and GCP cloud platforms.