THE AUTOMATION REVOLUTION :- ANSIBLE

Deepak Kumar Pandia
9 min readDec 1, 2020

Automation is a broad term that can cover many areas of technology where human input is minimized.

History

IT Automation is a process of automating jobs, batch processes, and workflows across the whole IT sector. For many years , most system administration and Infrastructure management has relied on manual tasks performed through graphical or command-line user interfaces. This approach is error-prone. It is easy for a system administration to skip a step or perform a step mistakenly. Furthermore , By managing each server manually and independently can make more difficult and introduce errors into the IT environment.

Need of Automation

Automation can help avoid the problems caused by manual system administration and infrastructure management. This builds a foundation to help us follow best practices in DevOps. Developers can define their desired configuration in the automation language. Automations helps in minimize Human Errors. Automation allows us to use code review.

Automation Tools:-

Although there are many configuration tools available in the market like puppet, chef,ansible but ansible has created its own popularity in this field.

Ansible is one of the most popular Configuration management tools that is growing popularity day by day in the field of automation.

What is Ansible??

Ansible is Simple IT Automation. Ansible is a universal language, unraveling the mystery of how work gets done. Turn tough tasks into repeatable playbooks. Roll out enterprise-wide protocols with the push of a button.

Ansible is an open-source automation tool, or platform, used for IT tasks such as configuration management, application deployment, intra service orchestration, and provisioning. Automation is crucial these days, with IT environments that are too complex and often need to scale too quickly for system administrators and developers to keep up if they had to do everything manually. Automation simplifies complex tasks, not just making developers’ jobs more manageable but allowing them to focus attention on other tasks that add value to an organization. In other words, it frees up time and increases efficiency. And Ansible, as noted above, is rapidly rising to the top in the world of automation tools. Let’s look at some of the reasons for Ansible’s popularity.

Why Ansible??

Working in IT, you’re likely doing the same tasks over and over. What if you could solve problems once and then automate your solutions going forward? Ansible is here to help.

How Ansible is powerful??

Red Hat Ansible Automation is an industry-leading enterprise automation platform trusted by over 1500 customers across multiple verticals and geographies, backed by one of the top ten open source communities worldwide.

Simple

  • Human readable automation
  • No special coding skills needed
  • Tasks executed in order
  • Get productive quickly

Powerful

  • App deployment
  • Configuration management
  • Workflow orchestration
  • Orchestrate the app lifecycle

Agentless

  • Agentless architecture
  • Uses OpenSSH and WinRM
  • No agents to exploit or update
  • Predictable, reliable and secure

Popularity

The interesting thing here is that Ansible actually grew from 36% in 2018 to 41% in 2019, overtaking Chef which only grew from 36% to 37%. Puppet also had a small increase from 34% to 37% to be equal second with Chef. The other big mover was Terraform which grew from 20% to 31% from the previous year.

Ansible has become a popular tool to use in recent years as it is able to manage a large number of servers by allowing users to create flexible, automated tasks that can be run from a centralised server and push changes out to remove hosts.

How Ansible work??

Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

Designed for multi-tier deployments since day one, Ansible models your IT infrastructure by describing how all of your systems inter-relate, rather than just managing one system at a time.

It uses no agents and no additional custom security infrastructure, so it’s easy to deploy — and most importantly, it uses a very simple language (YAML, in the form of Ansible Playbooks) that allow you to describe your automation jobs in a way that approaches plain English.

1. Modules

Modules are the one who makes Ansible smart. Modules are like small programs that Ansible pushes out from a control machine to all the nodes or remote hosts. The modules are executed using playbooks (see below), and they control things such as services, packages, and files. Ansible executes all the modules for installing updates or whatever the required task is, and then removes them when finished. Ansible provides more than 450 modules for everyday tasks.

2. Plugins

As you probably already know from many other tools and platforms, plugins are extra pieces of code that augment functionality. Ansible comes with a number of its plugins, but you can write your own as well. Action, cache, and callback plugins are three examples.

3. Inventories

All the machines you’re using with Ansible (the control machine plus nodes) are listed in a single simple file, along with their IP addresses, databases, servers, and so on. Once you register the inventory, you can assign variables to any of the hosts using a simple text file. You can also pull inventory from sources like EC2 (Amazon Elastic Compute Cloud).

4. Playbooks

Ansible playbooks are like instruction manuals for tasks. They are simple files written in YAML, which stands for YAML Ain’t Markup Language, a human-readable data serialization language. Playbooks are really at the heart of what makes Ansible so popular is because they describe the tasks to be done quickly and without the need for the user to know or remember any particular syntax.

5. APIs

Various APIs (application programming interfaces) are available so you can extend Ansible’s connection types (meaning more than just SSH for transport), callbacks, and more.

DevOps with Ansible:-

Communication is the key to DevOps

Unless automation is designed for teams, it’s just another tool. For it to serve people, automation needs to be smarter and simpler.

Simplicity grows more important the more people it impacts. That’s why Ansible is automation designed with everyone in mind.

Ansible: the language of DevOps

Ansible is the first human-readable automation language that can be read and written across IT. No matter what role you have in the organization, or how technical — Ansible gives you a common language to describe your IT infrastructure.

Ansible Use cases

Ansible seamlessly unites workflow orchestration with configuration management, provisioning, and application deployment in one easy-to-use and deploy platform.

Regardless of where you start with Ansible, you’ll find our simple, powerful and agentless automation platform has the capabilities to solve your most challenging problems.

1.Provisioning

Automate, manage and connect all stages of an application lifecycle

Provisioning with Ansible allows you to seamlessly transition into configuration management, orchestration and application deployment using the same simple, human readable, automation language.

2.CONFIGURATION MANAGEMENT

Ansible makes IT automation accessible.

Ansible is designed to be very simple, reliable, and consistent for configuration management. If you’re already in IT, you can get up and running with it very quickly. Ansible configurations are simple data descriptions of infrastructure and are both readable by humans and parsable by machines. All you need to start managing systems is a password or an SSH (Secure Socket Shell, a network protocol) key. An example of how easy Ansible makes configuration management: If you want to install an updated version of a specific type of software on all the machines in your enterprise, all you have to do is write out all the IP addresses of the nodes (also called remote hosts) and write an Ansible playbook to install it on all the nodes, then run the playbook from your control machine.

3.Application Deployment

Deploying apps shouldn’t be so hard

Ansible lets you quickly and easily deploy multitier apps. You won’t need to write custom code to automate your systems; you list the tasks required to be done by writing a playbook, and Ansible will figure out how to get your systems to the state you want them to be in. In other words, you won’t have to configure the applications on every machine manually. When you run a playbook from your control machine, Ansible uses SSH to communicate with the remote hosts and run all the commands (tasks).

4.Continuous Delivery

Release early & often but keep it simple

Ansible is the simplest way to deploy your applications. It gives you the power to deploy multi-tier applications reliably and consistently, all from one common framework. You can configure needed services as well as push application artifacts from one common system.

Rather than writing custom code to automate your systems, your team writes simple task descriptions that even the newest team member can understand on first read — saving not only up-front costs, but making it easier to react to change over time.

  • The CI asks Ansible to run a playbook that deploys a staging environment with the application.
  • When the stage tests pass, it might then be asked to run a production deployment.
  • Ansible can check out your artifacts from version control on each machine, or pull artifacts from the CI server, or from a package mirror.

5.Security Automation

When you define your security policy in Ansible, scanning and remediation of site-wide security policy can be integrated into other automated processes and instead of being an afterthought, it’ll be integral in everything that is deployed.

6.Orchestration

As the name suggests, orchestration involves bringing different elements into a beautifully run whole operation — similar to the way a musical conductor brings the notes produced by all the different instruments into a cohesive artistic work. For example, with application deployment, you need to manage not just the front-end and backend services but the databases, networks, storage, and so on. You also need to make sure that all the tasks are handled in the proper order. Ansible uses automated workflows, provisioning, and more to make orchestrating tasks easy. And once you’ve defined your infrastructure using the Ansible playbooks, you can use that same orchestration wherever you need to, thanks to the portability of Ansible playbooks.

Who use Ansible??

1530 companies reportedly use Ansible in their tech stacks, including LaunchDarkly, Tokopedia, and ViaVarejo.

Use Case : Infrastructure Integration with Dell EMC Storage:-

Automating Dell EMC Storage with the Ansible Automation Platform

The Dell EMC storage portfolio provides deep integration with Ansible through a number of modules to enable configuration management and workflow automation for a number of use cases including SAN zone setup, provisioning, snapshots, remote replication as well as data and workload mobility across the hybrid cloud.

Conclusion

To sum up, using Ansible can significantly simplify your processes by allowing you to work and to automate all that work!.

THANK YOU FOR READING ………

--

--