An Introduction about Configuration Management Tool: Ansible

Posted By : Nitin Kumar | 24-Apr-2020

In IT managing Configure the same package in multiple servers is a time taking process here ansible comes into the picture.


What is Ansible:

Ansible is a configuration management and orchestration tool.  It works as an IT automation engine. We can run ansible directly from the command line without setting up any configuration files. You just need to configure ansible on the control server or master node. It communicates with worker nodes and performs the required tasks using SSH.

 

Ansible uses playbooks for a series of tasks. The playbooks are written in YAML syntax. Playbooks are a collection of tasks that you want to perform.

 

Why Ansible:

  • One of the best advantages of using Ansible is ansible is free to everyone.
  • The combinations of inventories, modules, and playbooks make ansible perfect orchestration for large environments.
  • It is secure due to agentless capabilities and due to the OpenSSH security features. 

 

Ansible Key Terms:

 

Control node: Node that has an ability installed and controls another node.

Managed node: The network devices and servers that are managed with Ansible. Managed nodes are also called “hosts”. No need to install ansible on Managed nodes. 

Inventory: A list of managed nodes. An inventory file also is known as  “host file” sometimes. Your inventory can contain an IP address for each host. 

Modules: A unit of code that ansible executes on client-side.

Tasks: The units of action are ansible. You can execute a single task at a time with an ad-hoc command.

Playbooks: Ordered list of tasks, saved so you can run those tasks in that order repeatedly. Playbooks can include variables as well as tasks.

 

Install ansible in control node:

 

From your control node:

$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt update
$ sudo apt install ansible

 

Check ansible version by using:

$ ansible --version

 

The output of the command: 

 


 

 

Now for verification, you can check into /etc/ansible/ansible.cfg this is the main/default configuration file of ansible 

$ ansible -i hosts all -m ping

  -i   Will tell hosts file

 -m  The command issued via the -m parameter.  
This command will give you ping pong response if you are able to ping managed node from controller node


We provide Python web development services that helps in increasing website performance. Avail our python development services today!
 

About Author

Author Image
Nitin Kumar

He has knowledge of linux,docker,Kubernetes,Helm. Also has knowledge of Jenkins,Gitlab (CI/CD tools). Love to work in new technologies and implement it. Always try to do best in any work that is assigned.

Request for Proposal

Name is required

Comment is required

Sending message..