Ansible : Introduction, installation and configuration


Ansible is an opensource automation tool used for Configuration Management. It is used for Application Deployment and server provisioning. It works on an agent less architecture on client nodes.

It used a simple language called Yaml for Ansible Playbooks, used to describe the automation job.

Installing Ansible

  • yum install ansible -y

Configuring Ansible

  • The Inventory file, a simple ini file that consists the details of the hosts to whcih Ansible pushes the configurations is listed by default in:  “/etc/ansible/hosts“.
  • To add a node, enter its IP address at the end of the file. As you get comfortable you may explore the contents of this file and add the node in the appropriate section.
  • From this server system ssh to the client node to ensure the ssh connections gets established without any issue.
  • Run the command “ansible all -m ping –ask-pass” to verify if Ansible host can communicate with the nodes mentioned in the Inventory file. If all goes well, the result will be as follows:

[root@gw16-lap-devops ~]# ansible all -m ping –ask-pass
SSH password:
host1 | SUCCESS => {
“changed”: false,
“ping”: “pong”


Click here for additional documents to deploy appache, php, mysql, create databases and tables, and to copy files.