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.
Use Cases of Ansible:-
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 —
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:-
- Can perform task parallelly at a time on multiple server.
- No need to install any agent on client machine. Or we can say ansible is agent less.
- No need to open any external port. Ansible use ssh service port.
- We can use it for machine provisioning.
- Configuration management
- We can manage our deployment.
- No need of advance scripting for automation. There are lots of modules available.
Disadvantages of Ansible:
- Error reporting method is not user friendly. It will display numbers of lines in logs that will create confusion all times.
- After executing playbook, we cannot edit it. If we will do ansible will not update latest changes.
- Ansible is OS dependent means it is not necessary playbook that is working on Centos will work on Ubuntu also.
- Somewhere it is lacking in case of Windows OS.
- 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!!!