Ansible - An Automation Tool

Ansible - An Automation Tool

Ansible is a configuration management Tool. We have a system admin in our organization. He manages all the servers of a company. For example there are 50 servers in a company. As system admin his responsibilities may include to install Linux, ubuntu or windows on different servers. Or he might have to install packages on several servers. He should also know about IP addresses of all the servers and make sure that all servers are up and running. Managing network and devices are under the responsibilities of a system admin. We can say that system admin is responsible for configuration management of all the servers. Configuration includes the RAM management, storage used, software installed, IP address etc. System admin is doing his work manually which may prune to errors. Because in manual work mistakes are more likely to happen. We have automated this work of system admin. Ansible is one of the tools used for this purpose. Other tools used for this purpose are chef and puppet. The script used by ansible is written in YAML. Ansible works on Push mechanism. RedHat has launched a new GUI version of ansible known as ansible tower. If you want to install OS on multiple machines or send an update to a large number of servers at once you can do it through configuration management tool.

Definition

Ansible is an open source IT configuration management and deployment tool written in Python

Ansible Architecture

No alt text provided for this image

The above figure shows the architecture of Ansible. Ansible server communicates with nodes directly. Server will directly push updates to nodes. One of the advantage of ansible is that it has less complications as there is no workstation. Ansible scripting language is YAML. This is human readable language. Ansible is agentless as no agent like chef client needs to be installed on nodes. It communicates with nodes through SSH. The code written in ansible is known as playbook.

Advantages

1. Ansible is free to use by everyone.

2. Ansible is light weight as its package takes very less space and has no constraints regarding the OS and underlying hardware.

3. Very secure due to its agentless capabilities and open SSH security features. Consider a scenario that you have hired a guard for you home and in another scenario you have not hired guard for your home but it is still secured because of it high walls and security camera. It might be that guard can be involved in a theft in your house. So guard is a vulnerability as well. Similarly, if hacker hacked the agent then it can access your servers and misconfigure your nodes. But if there is no agent it cannot be hacked.

4.  Ansible does not need any special system admin skills to install and use it.

Disadvantages

1. Insufficient user interface, though ansible tower is GUI, but it is still in development stages.

2.  You cannot achieve full automation through ansible.

3.  New to market therefor limited support and documentation is available.

Host Patterns – suppose you have created an ansible server and it is now connected with 10 nodes. It is not necessary that you have to update software on all the nodes. It might be that you want to install update on node2 and node3 or say only on node8. So how you will do that? You will use host patterns.

No alt text provided for this image

Important Host Pattern Commands

No alt text provided for this image



Syed Aqeel Abbas Naqvi

Freelancer | Azure DevOps | AWS DevOps | Azure Cloud | AWS Cloud | Microsoft Administrator

1y

Great Article.

Like
Reply

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics