Ansible — A revolution to IT

Hello guys in today’s blog I am going to talk on a very hot topic called Ansible.

Ansible is a software developed in Python to automate the repetitive work in IT. Now question arises why Ansible? When there is lot of automation tools like Jenkins, Nagios, Docker, Kubernetes so what is new in ansible?

Simply you can say that all these tools are also automation tools, but it’s depended on you what kind of automation you want to achieve like if you want to automate your monitoring then use Nagios. If you want to automate your deployment and testing, then use Jenkins. Similarly, if you want to automate your configuration level task then use ansible.

Source: Bing Search!

Ansible is an opensource IT configuration management tool. By using this tool, we can manage our infra level changes on (Server/devices/cloud).

  • Server (windows/Linux): We can manage our server level changes like installation, patching, confrontational changes, addition or deletion of users, copy data and deployment etc.
  • Device (Router/switch/firewall): Also we can automate our device level task like backup, User addition or deletion and configuration changes etc.
  • Cloud (Aws/Azure/open stack): We can manage cloud service like to launch new instance, terminate existing instance and to create AMI lots of operation we can perform with the help of ansible.

Architecture or Working of Ansible —

Source: Bing Search!

From above diagram we can easily understands, how an Ansible architecture works behind the scenes. Let us talk about these terms more.

  • Master Node: Master Node or Ansible managed node is a Ansible configures instance on which ansible is already installed or configured by a developer.
  • Playbook: A playbook is a code written in YAML format contains instructions to configure instances. Playbook also known as Configuration files contains all the commands need to be run in a system to configure it. This commands are independent ansible commands, Which means that you don’t have to worry about the type or family of the client/host node.
  • Inventory: It is a file containing all the IP addresses of the clients where some configuration with the help of Ansible is to be done. Inventory contains all the IP’s of client Node.
  • Client/Host Node: Client or Host Nodes are the nodes where some configuration have to be done. The nodes on which configuration is done by Master Node is known as Client.

Advantages of Ansible:-

  1. Can perform task parallelly at a time on multiple server.
  2. No need to install any agent on client machine. Or we can say ansible is agent less.
  3. No need to open any external port. Ansible use ssh service port.
  4. We can use it for machine provisioning.
  5. Configuration management
  6. We can manage our deployment.
  7. No need of advance scripting for automation. There are lots of modules available.

Disadvantages of Ansible:

  1. Error reporting method is not user friendly. It will display numbers of lines in logs that will create confusion all times.
  2. After executing playbook, we cannot edit it. If we will do ansible will not update latest changes.
  3. Ansible is OS dependent means it is not necessary playbook that is working on Centos will work on Ubuntu also.
  4. Somewhere it is lacking in case of Windows OS.
  5. We can not explore ansible cli more. For that we must go with Ansible tower that is paid.

Thank you for reading the above blog, Hope you enjoyed reading it. Kindly do like share this to whom you think it will be useful!!!

Hey Readers, I am tech enthusiast and an Computer Science Student. Here I am sharing various industry use cases and its solution.