Why Ansible is so popular

Ansible is by far the most popular tool for IT Automation. While IT Automation existed even long before Ansible was even released it has become the first choice today.

To be clear with this: Ansible is not the right tool for everyone. There are environments where we are better off with other tools. However comparing Ansible to some other tool doesn’t make much sense unless we tried it. It takes only a few minutes to get to the first results.

That simplicity is its strength and made it so popular. A decade ago when I started with IT Automation things were completely different. Only those who were running large environments would benefit from IT Automation. Setting up some configuration management meant to do a lot of prior planning and development, having a rollout strategy, installing and configuring agents on all systems and so on. Tools were optimized for large environments that were intended to be around for 5-10 years. Using configuration management for a couple of Apache and MySQL servers wouldn’t make much sense back then. All planning was characterized by long-term thinking.

Nowadays we are able to set up a whole virtual datacenter in the cloud within minutes. And if next week we do not need it anymore we can destroy it even faster. No need to think about how we scrap our servers. While a decade ago it required a lot of planning today datacenters are ephemeral. There is no long term planning necessary to do that.

Being able to go that speed means we have to adopt Infrastructure as Code. It is a prerequisite even for small organizations. In order to gain that speed we need simplicity.

Think about building a race car. If we want to maximize its speed we have to get rid of everything that is not essential on the race track. There is no back seat, no trunk, no air conditioning. We dismount all of that to make it go as fast as possible.

It is the same thing with Ansible. It is as simple as it can be. And that simplicity allows us to go as fast as possible. Compared to other Configuration Management tools it lacks agents that keep everything up to date automatically. It only allows pushing configuration rather than pulling.

Assume we want to install Apache on Ubuntu. We have to use the apt module and install the apache2 package. To do the same thing on RHEL we have to go a different path and install the httpd package with the yum module. Ansible uses a very low level of abstraction. Other tools like Puppet or SaltStack allow us to use a package module that takes care of the differences among distributions. Ansible does not have that abstraction which is often used a point of criticism and incurrs some extra work if we have to manage CentOS/RHEL and debian/Ubuntu. But on the other hand the missing abstraction makes things more natural. To an Ubuntu it will be quite natural to use the apt module while for RHEL users it is natural to use the yum module.

The one thing that makes Ansible superior to other tools is simplicity. It does not require a central server. It does not require any daemons. It does not require any cronjobs. It is as simple as writing a shell script.