Ansible Overview

Ansible Overview


4 min read

In the Field of IT, Automation and Configuration management have become indispensable. As systems grow in complexity, the need to manage and provision them in a reproducible and scalable manner is crucial. Here Ansible can help it's a simple, agentless IT automation tool that has become a go-to solution for many administrators and developers.

What Is Ansible?

Ansible is an open-source automation tool that helps in software provisioning, configuration management, and application deployment. Developed in Python, it uses a YAML to describe system configurations, making it readable and easy to implement. With its agentless architecture, all you need is SSH access and Python installed on the target nodes. In the case of Windows, It can use Winrm to connect to the Windows host and execute automations. Not only servers you can manage network devices like routers, switches etc with Ansible.

Ansible Architecture

Ansible Architecture Central node pushing configuration to managed nodes.

Ansible's design is straightforward and Easy to understand:

  1. Control Node: This is the machine where Ansible is installed and from which all tasks and playbooks are run.

  2. Managed Nodes: These are the systems that are managed by the control node. No agents are installed on these systems.

  3. Inventory: A file that lists all managed nodes.

  4. Playbooks: Written in YAML, these define the desired states of systems, describing tasks to be executed on managed nodes.

  5. Modules: These are units of code Ansible executes. With over a thousand modules, Ansible can manage almost any IT component.

Ansible communicates with its managed nodes using SSH. but, for Windows nodes, it utilizes WinRM.

One of the standout features of Ansible is its agentless nature. This means there's no need to install any additional software on the managed nodes. Instead, Ansible is only installed on the control node. The configurations/Automation Steps are stored in files called playbooks written in YAML, while the list of nodes it manages is documented in an inventory file, typically in INI format. To ensure security, the credentials used to connect to the managed nodes are stored securely in the Ansible Vault, where they are encrypted.

When it's time to execute tasks on the managed nodes, Ansible converts these tasks from the playbooks into small Python scripts called modules. These modules are then dispatched to the managed nodes for execution. This process showcases Ansible's "push" mechanism, where configurations are actively sent to the managed nodes.

For IT devices like networking equipment that have limited computing power and constraints, Ansible runs modules on the control node instead of directly on the devices. These modules then produce specific commands tailored for each device or initiate API requests to automate various tasks.

Automation Execution is idempotent means if you run an Ansible playbook once or multiple times, the end state of the target system will remain the same. This means repeated playbook runs won't unintentionally change systems, making Ansible's automation dependable.

Why use Ansible?

  1. Open Source: Being open-source, Ansible benefits from collective expertise, allowing for rapid improvements.

  2. Simplicity: Ansible's declarative language (YAML) means that even those unfamiliar with programming can understand and write playbooks.

  3. Agentless: There's no need to install any software on the managed nodes. This reduces overhead and potential attack vectors.

  4. Versatility: From managing configurations and deploying applications to orchestrating complex workflows, Ansible can handle it all. It can even manage Cloud Infrastructure like AWS, Azure, Google Cloud, VMware, etc.

  5. Community Support: A large, active community ensures that new modules are continually added, and existing ones are maintained.

  6. Extensibility: With its modular architecture, it's easy to extend Ansible to support custom or niche requirements. Lots of pre-created modules are present for various use cases. You can write your custom modules using languages like Python, bash, PowerShell, etc., returning JSON.

Community Ansible Vs RedHat Ansible Automation Platform

Community Ansible is open-source, while the Red Hat Ansible Automation Platform is a commercial offering by Red Hat, which builds on the foundation of Community Ansible.

Community Ansible is perfect for those looking for a free, open-source automation tool with a broad ecosystem.

Red Hat Ansible Automation Platform Provides Professional support, A curated collection of certified modules, Regular updates, better integration with other Redhat products and additional features such as advanced analytics, logging, and integrations making it suitable for enterprises with critical workloads and requirements.

Ansible vs Puppet vs Chef

Comparison of Ansible with other automation tools.

Comparison between Ansible Vs Puppet Vs Chef


In the ever-evolving realm of IT, the importance of efficient and scalable management cannot be overlooked. Ansible emerges as a robust solution, offering a blend of simplicity, versatility, and security in its automation capabilities. it's a game-changer in the landscape of IT automation.