Introduction to Ansible

Samyog GhimireSamyog Ghimire
2 min read

Why Ansible?

Imagine a company that manages five physical servers, each running different operating systems: two running CentOS, two running Ubuntu, and one running Windows. Now, consider that a system administrator has been writing scripts to handle various tasks, such as managing system-level dependencies, application versions, and keeping servers up to date. If the administrator uses commands specific to CentOS, like yum for package management, these commands won't work on Ubuntu or Windows. Similarly, Linux-specific commands won’t run on Windows servers, creating a significant challenge when maintaining and automating tasks across multiple operating systems.

This is where automation tools like Ansible, Puppet, and Chef come into play. These tools were developed to solve the problem of managing diverse systems efficiently and consistently, no matter the operating system. Among these, Ansible has become a popular choice due to its agentless architecture and simplicity.

Why Ansible over Puppet and Chef?

Ansible stands out from Puppet and Chef primarily because of its agentless nature, which means you don’t need to install any agent software on the remote nodes. You simply use SSH (or WinRM for Windows) to communicate with your managed servers, which makes it easier to deploy and manage. Moreover, Ansible’s configuration files—known as playbooks—are written in YAML, a human-readable language that is simple to understand and modify. This ease of use, combined with powerful automation capabilities, makes Ansible an attractive solution for many system administrators.

What is Ansible?

Ansible is a powerful automation platform that simplifies the management and configuration of remote servers, ensuring they are in the desired state. It allows for the automation of various tasks, including provisioning (e.g., creating EC2 instances or S3 buckets), configuration management (ensuring that all virtual machines are configured correctly), application deployment (managing software versions and updates), and network automation.

Ansible operates with two main components:

  1. Control Node: This is the machine where Ansible is installed. It acts as the central management point from which commands and playbooks are executed.

  2. Managed Nodes: These are the remote servers (virtual or physical) that Ansible controls and manages.

Ansible can easily manage configurations, deployments, and updates across multiple servers, whether they are running different Linux distributions (like CentOS and Ubuntu) or even Windows. Its simplicity, combined with powerful automation capabilities, has made Ansible the go-to solution for modern infrastructure automation.

By using Ansible, system administrators can streamline their workflows, reduce human errors, and ensure consistency across diverse environments—making their jobs significantly easier and more efficient.

0
Subscribe to my newsletter

Read articles from Samyog Ghimire directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Samyog Ghimire
Samyog Ghimire