Ansible (Use Cases and Advantages)

sonu kushwaha
5 min readMar 21, 2022

--

What is Ansible:

The Ansible tool was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Fedora Unified Network Controller (Func) framework for remote administration.

Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.

It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows.

Use Cases:

APPLICATION DEPLOYMENT:

When you define your application with Ansible, and manage the deployment with Ansible Tower, teams are able to effectively manage the entire application lifecycle from development to production.

CONTINUOUS DELIVERY:

Creating a CI/CD pipeline requires buy-in from numerous teams. You can’t do it without a simple automation platform that everyone in your organization can use. Ansible Playbooks keep your applications properly deployed (and managed) throughout their entire lifecycle.

Advantages:

Easily Understandable Python Language

One of the prominent advantages of Ansible also refers to the language in which it is written. Python is a human-readable language and serves as the basis for Ansible. It provides better facilities for getting Ansible and running it due to the presence of Python libraries on the majority of Linux distributions by default.

Python is a highly ideal alternative for administration and scripting tasks implying higher popularity among engineers and system administrators. Another interesting aspect of Ansible is the facility of Ansible modules that can improve its functionality. The Ansible modules can be written in any language. However, the important concern, in this case, is that the module should return data in JSON format.

Playbooks are written in YAML

The use of Playbooks in Ansible is also another reason for the major advantages of Ansible. Playbooks are Ansible configuration files, and the language for writing them is YAML. The interesting factor, in this case, is that YAML is a better alternative for configuration management and automation.

The superiority of YAML over other formats like JSON makes Ansible better configuration management and automation tool. Ansible makes it easy to read and supports comments. Most important of all, it also includes the use of anchors to reference other items.

Ansible Galaxy

Another notable entry among advantages of Ansible refers to the Ansible Galaxy. Ansible Galaxy is a portal that acts as the central repository for locating, reusing, and sharing Ansible-related content. The best advantage of Ansible Galaxy is in the example of downloading reusable Roles for installing application or server configuration. The downloads are ideal for use in a particular user’s playbooks and can contribute substantially to an increase in deployment speed.

Why Choose Ansible?

1) Lower Learning Curve:

Ansible has a very fast learning rate, with easy installation and initial configuration. In less than 30 minutes, it is possible to install, configure and execute ad-hoc commands for ’n’ servers to solve a specific problem: Daylight saving time adjustments, time synchronization, root password change, updating servers, restarting services, etc.

Syntax and workflow are simple to understand, making it easy to learn for new users. The files use YAML (YAML Ain’t Markup Language), a user friendly declarative language standard that is widely used by other tools and easy to understand, with the addition of using the Python language to extend the functionality of Ansible with customized modules.

2) No Agents: Only an “Ansible Control”

Ansible does not require agents installed at the endpoints. The only requirement is an Ansible installed server with access to the servers to be managed through SSH (for Linux environments) or WINRM (Windows Remote Access) protocols. Playbooks push the desired settings on the hosts defined in the inventory and can even run Ad-Hoc (via the command line, not requiring definitions in files). The agentless model makes adjustments and communication faster than the client-server model.

The only requirement on Linux hosts is to have Python installed. Today Python is natively installed on most Linux distributions.

Who uses Ansible?

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

How Companies Use Ansible:

  1. AMELCO:

Amelco is a UK-based company that develops software solutions for the betting industry and financial betting markets. The business was looking for a way to deploy its applications efficiently across its hundreds of different environments, and it also sought to limit downtime. To do this, Amelco performed an Ansible migration to an agentless automation framework. This reduced the complexities it faced with the deployment, operations and the upgrade of applications over a range of contrasting locations, while also using one simplified language.

In addition, by introducing Ansible and Ansible Tower, Amelco has successfully automated its application deployments. Other benefits include reduced complexity and continuous delivery, along with speed solution delivery.

Further benefits include:

  • “Faster time to deployment for its bespoke and modular client solutions, resulting in speedier time to market and higher customer satisfaction”.
  • “A simplified and repeatable deployment process, leveraging true multi-tier, multi-step orchestration that minimized the complex dependencies of heterogeneous environments,”.

Conclusion

On a final note, we can conclude that Ansible provides a simple and powerful package for configuration management and automation.

The growing interest in Ansible due to the adoption of Ansible by renowned agencies such as NASA can also turn the tables. The diverse functionalities of Ansible, such as provisioning, orchestration, application deployment, and security and compliance, show its potential. These capabilities of Ansible can translate effectively into a comprehensive DevOps tool.

--

--