slideshare quotation-marks triangle book file-text2 file-picture file-music file-play file-video location calendar search wrench cogs stats-dots hammer2 menu download2 question cross enter google-plus facebook instagram twitter medium linkedin drupal GitHub quotes-close
An iMac showing the phrase "do more"

If you work in IT, you've probably heard of Ansible. Ansible, according to CIO, is the DevOps "darling" for software automation, having "[come] out of nowhere to become the number one option for software automation in many companies." 

Ansible is used by over 1,000 organisations, including Intel, Evernote, and Hootsuite, according to StackShare, and Apple and NASA (according to the Ansible blog). So, what is Ansible? We'll go over it in more detail here.

Let's start with an overview of what Ansible is.

What exactly is Ansible?

Ansible is an open-source automation tool or platform for activities like configuration management, application deployment, intraservice orchestration, and provisioning in the IT world. With IT infrastructures that are too complicated and frequently need to grow too fast for system administrators and developers to keep up if they were to handle everything manually, automation is critical these days. 

Automation makes complicated processes easier to handle, enabling engineers to concentrate on tasks that bring value to the business. In other words, it saves time and boosts productivity. And, as previously said, Ansible is quickly ascending the ranks of automation tools. Let's take a look at some of the factors that contribute to Ansible's popularity.

Let's look at the different Ansible benefits now that we've learned what Ansible is.

Ansible is a free open-source tool

  1. It's really easy to set up and use: Ansible's playbooks don't need any particular coding knowledge (more on playbooks later)
  2. Ansible is a powerful tool that allows you to model even the most complicated IT processes
  3. Regardless of where the application is installed, you may orchestrate the whole application environment. You may also modify it to meet your specific requirements
  4. On the client computers you wish to automate, you don't need to install any additional software or open any firewall ports. You don't even need to create a separate management structure
  5. Because no additional software is required, there is more space on your server for application resources

Let's continue our exploration of what Ansible is by learning about its features and capabilities.

5 Main features

1. Configuration Management

It’s worth noting that Ansible was not specifically made for Configuration Management. In fact, Ansible can be considered as a Swiss Army Knife for automating many things. Compared to very specific tools (such as Puppet or Chef) which are focused on the particular challenge of ensuring configuration is in a good state.

Ansible was made to make automation easy, dependable, and consistent. Ansible configurations are basic infrastructure data descriptions that can be read by people and parsed by computers. To begin controlling computers, you'll just need a password or an SSH (Secure Socket Shell, a network protocol) key. 

An illustration of how simple configuration management is using Ansible: If you want to update a particular kind of software on all of the computers in your business, all you have to do is write down all of the nodes' IP addresses (also known as remote hosts) and create an Ansible playbook to install it on all of them, then 
execute the playbook from your control machine.

2. Application Deployment

Ansible allows you to deploy multi-tier applications fast and simply. You won't need to create bespoke code to automate your systems; instead, you'll write a playbook that lists the activities that must be completed, and Ansible will figure out how to bring your systems to the condition you want. In other words, you won't have to manually setup apps on each computer. Ansible utilises SSH to connect with remote hosts and execute all instructions when you run a playbook from your control computer (tasks).

3. Orchestration

Orchestration, as the name implies, is combining many components into a well-oiled whole—much like a musical director combining the sounds generated by various instruments into a coherent creative piece. When it comes to application deployment, for example, you must take care of not just the front-end and back-end services, but also the databases, networks, storage, even the containers and/or servers. You must also ensure that all jobs are completed in the correct sequence. Ansible makes job orchestration simple by using automated workflows, provisioning, and other features. Because Ansible playbooks are portable, you can utilise the same orchestration anywhere you need it after you've established your infrastructure using Ansible playbooks.

4. Security and Compliance

Sitewide security policies (such as firewall rules or user locking down) may be deployed with other automated procedures, much as application deployment. When you set the security details on the control computer and execute the related script, that information is immediately updated on all remote servers. That means you won't have to manually check each computer for security compliance on a regular basis. An admin's user ID and password aren't retrievable in plain text on Ansible for further protection.

5. Cloud Provisioning

The first step in automating your applications’ life cycle is automating the provisioning of your infrastructure. With Ansible, you can provision cloud platforms, virtualised hosts, network devices, and bare-metal servers.

Next, we’ll talk about Ansible architecture.

Ansible Architecture

Now let’s talk a bit about the pieces that make up the Ansible environment.

1. Modules

Modules are tiny programmes that Ansible distributes to all nodes or remote hosts from a command machine. Playbooks (see below) are used to run the modules, which control things like services, packages, and files. Ansible runs all of the modules for installing updates or doing whatever job is needed and then removes them when they're done. Ansible includes around 450 modules for common tasks.

2. Plugins

Plugins are additional bits of code that enhance functionality, as you undoubtedly already know from many other tools and platforms. Ansible includes a variety of plugins, but you may also build your own. Three examples are action, cache, and callback plugins.

3. Inventories

All of the computers you use with Ansible (control and nodes) are specified in a single easy file, including their IP addresses, databases, servers, and other information. After you've registered the inventory, you may use a simple text file to assign variables to any of the hosts. You may also get inventory from places like Amazon's EC2.

4. Playbooks

Ansible playbooks are task-specific instruction manuals. They're just plain text files written in YAML (YAML Ain't Markup Language), a human-readable data serialisation language. Playbooks are at the core of what makes Ansible so popular since they define actions that can be completed fast and without the user having to know or remember any specific syntax. They can not only define configurations, but they can also coordinate the stages of any manually organised job and perform activities simultaneously or sequentially.

Each playbook has one or more plays, each of which has the aim of assigning a group of hosts to well-defined roles, which are represented by chores.

5. APIs

Ansible's connection types (meaning more than simply SSH for transmission), callbacks, and other features may all be extended via APIs (application programming interfaces).

Now that we've gotten a good idea of what Ansible is, let's take a peek inside the Ansible tower.

6. Roles

A role is a set of Ansible artifacts that lets you load vars, files, tasks, handlers, and other Ansible artifacts automatically. Content can be reused and shared easily after it has been grouped into roles.

7. Search path

Modules, module utilities, plugins, playbooks, and roles can live in multiple locations. If you write your own code to extend Ansible’s core features, you may have multiple files with similar or the same names in different locations on your Ansible control node. The search path determines which of these files Ansible will discover and use on any given playbook run.

Conclusion

As an automation engine, Ansible automates tasks such as cloud provisioning, configuration management, deployment, intraservice orchestration, and much more. Rather than managing each system individually, Ansible describes how all your systems interrelate, allowing you to build multi-tier deployments from day one. Using YQL, in the form of Ansible Playbooks, it's very simple to describe your automation jobs in a familiar way. Since it doesn't use any agents or additional security infrastructure, it's very easy to deploy.

We’ve only just scratched the surface of what Ansible is and is capable of, but we hope this whistlestop tour has helped you to understand how Ansible can make automation easier. We can talk to you about our DevOps services to see how we can simplify your processes.