how to install ansible in centos71 min read

We need your support!!
Other Amount:
techrunnr.com:
24-Hour Flash Sale. Courses from just ₹ 490.
Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Hi Readers, this document deals with how to install ansible in centos7

Ansible is open source software that automates software provisioning, configuration management, and application deployment. Ansible connects via SSH, remote PowerShell or via other remote APIs.

1. Install EPEL repository

yum install epel-release

2. Update the system repositories

yum update

3. Install ansible

yum install ansible

Once you install ansible you can start using it

Before start using Ansible, you need to add your servers into inventory.
By default ansible inventory is stored in /etc/ansible/hosts .

You can add your server list in the server as follows,

alias ansible_ssh_host=<ServerIP>

Even you can group the server as follows,

[groupname]
alias ansible_ssh_host=server_ip
alias ansible_ssh_host=serverIP

[webserver]
192.168.10.22
192.168.10.33

Copy ansible server root user ssh key to all your server for passwordless authentication.

Once it is done, ansible can log in to the server list without the password.

Now you ping all the servers in you list inorder to check the connectivity. Below is the exected output .

root@proxmox:/home/manage# ansible -m ping all

192.168.10.22| SUCCESS => {
"changed": false, 
"ping": "pong"
}
192.168.10.33 | SUCCESS => {
"changed": false, 
"ping": "pong"
}

Now you have done with ansible installation and test the connectivity.

check this document for ansible installation in ubuntu 16.04

We need your support!!
Other Amount:
techrunnr.com:
#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

You may also like...

Leave a Reply