Understanding Ansible

π DevOps & Cloud Engineer | βοΈ AWS | π³ Docker | βΈοΈ Kubernetes | βοΈ Jenkins | π€ Ansible | π οΈ Terraform | π CI/CD | π― ArgoCD | π Driving Automation and Cloud Scalibility
What is Ansible?
Ansible is a powerful Configuration Management Tool.It is having Agentless Architecture means there is no need to install agent software on Managed nodes.It works well with YAML manifests.
Why Ansible?
What about other Configuratrion management tools?
lets Explore Ansible in detail
Earlier System Administrator used to perform server configurations manually.
A wise system Admin would write a shell script to perform some instructions on configured servers.
What if Servers have different operating systems, different Linux Distributions?

let us suppose there 5 servers, 2 have CentOS linux Distributions, 2 have Ubuntu Linux Distributions and 1 belongs to Windows OS
If a System Admin tries to execute a shell script to perform some instructions over these VMs ,it will fail because CentOS have "yum" modules, Ubuntu have "apt" packages and Windows servers requires powershell script.
Hence it was very difficult to configure servers earlier. System admin used to do these tasks manually which requires lot of efforts and patience.
Then Configuration tools like puppet , chef came into market as configuration management tool.But one has to be good in Ruby syntax and complex syntax of puppet, chef. These Configuration management tools are not agentless. One has to install Agent softwares over servers for configuration.
Then Ansible came into Picture.It is having Agentless Architecture.It uses Yaml manifests to perform instructions over Managed Nodes.

Control Node:It is the VM(or my be our personal laptop) on which Ansible is installed.
Managed Nodes:These are the VM which are configured with control node and displays actions performed by Ansible on them
The only pre-requisite required to run Ansible is python3 should be installed on both Control node and managed nodes.
Shell script vs Python vs Ansible:
Suppose installing Oracle database on the system using shell script, python and Ansible.
As we discussed earlier, Shell script will fail due to different OS, different Linux Distributions.
One has to be good Enough with Python programming language to install Oracle database. one should have experience with using python modules.
Ansible uses Yaml syntax to perform actions over managed nodes which is popular industry standard.
Hence using Ansible will be suitable in this scenario.



