Start Automation with Ansible

Configuration Management Tools to Automate Infrastructure

Configuration Management tools like Puppet, Chef, Ansible, SaltStack, CFengine are some of the most famous tools to automate your Infrastructure with IaC (Infrastructure as a Code) Framework. Sometimes it become very difficult for Admins and/or developers to understand what exactly these tools are doing and how to start with these tools. And here starts the race on google with multiple web-links and finally the race ends in a big mess sometimes.

Ansible

What is Configuration Management


Let me try to explain it in simple layman language, what actually Configuration Management is in Infrastructure vertical – Let’s take an example where you get multiple requests to create a similar filesystems, users, groups, files, directories, packages, services etc. and hence an application, which is a combination all of these utilities we just mentioned. In traditional approach we will login into the server and perform all these tasks manually which is fine, but what if we have 10 server to do the same repeated task or 50 servers to perform the same operations. One pointer would be use of custom script which is again acceptable as far as the initial installations and configurations are concerned, but what if someone has intentionally or by mistake have removed some files/users/services/packages (or any other configuration) which were configured using scripts. The only answer is “unintended downtime” and hence business loss. In order to avoid such situations, Configuration  Management tools are developed to Deploy, Manage, Orchestrate and Monitor your complete infrastructure. If there are any deviations in the defined configuration for a running client, the Centralized Configuration Management server will force to change the configurations back in defined state and hence no deviations in the running configuration for 1 day, 1 year, 10 years or till the time server is active (unless you don’t change the configuration in the Centralized Configuration Management server).

How to start Ansible Automation Journey


Lets understand what would be the best approach to start with Ansible. Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Func framework for remote administration, developed the platform called “Ansible” on 20th Feb’ 2012.

Ansible is an Open-Source IT automation tool used by System/DevOps Administrators to Configure, Deploy, Orchestrate and Manage any Infrastructure Environment.

The setup for Ansible is very simple as Ansible is written in Python and based on Agentless Model. Ansible setup is divided majorly into two parts:

Ansible Controller Node (The heart of all configurations, also called Master Node or Central Configuration Server)
Ansible Managed Nodes   (These all are the clients for Ansible Controller Node)

To directly start with Ansible codes is not a wise idea, so we suggest to set a strong foundation to start Ansible learning with simple environment setup and then get familiar with Ansible Terminology and standard terms like “Modules” “Ad-hoc Requests” “Playbooks” “Variables” “Roles” “Galaxy” “Vault” etc. and then move further towards Playbook writing and Role setup.

To start with Ansible, configure EPEL (Extra Packages for Enterprise Linux) to install extra repository to install and configure Ansible Package Repository:

EPEL FOR ANSIBLE REPOSITORY

In our next posts we will get to know about Ansible Installation and Configuration on CentOS and Ubuntu, Ansible Communication, Modules, Ad-hoc requests, Playbooks, Roles, Galaxy, Vault an other related concepts of Ansible.

1 thought on “Start Automation with Ansible”

  1. Pingback: Ansible Setup For CentOS – Thinknyx

Leave a Comment

Your email address will not be published.