Sunday 17 June 2018

How to Install Ansible on CentOS 7

Ansible is a free and open source Configuration and automation tool. We can manage a large number of client machines from a central machine. It communicates over SSH and it doesn’t
require installing any agent on the client machines.

Step 1: Follow the article How to install EPEL repository on Centos7 to enable EPEL repository.

Step 2: Install Anisble using below command:

[root@linuxcnf ~]# yum install ansible
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  ansible.noarch 0:2.5.3-1.el7
Dependency Installed:
libtomcrypt.x86_64 0:1.17-26.el7     
libtommath.x86_64 0:0.42.0-6.el7      
python-babel.noarch 0:0.9.6-8.el7      
python-httplib2.noarch 0:0.9.2-1.el7
python-jinja2.noarch 0:2.7.2-2.el7  
python-keyczar.noarch 0:0.71c-2.el7   
python-markupsafe.x86_64 0:0.11-10.el7 
python-paramiko.noarch 0:2.1.1-4.el7
python2-crypto.x86_64 0:2.6.1-15.el7 
python2-jmespath.noarch 0:0.9.0-3.el7 
sshpass.x86_64 0:1.06-2.el7

[root@linuxcnf ~]# 

Step #3: use the below command to check and verify Ansible Installation:

[root@linuxcnf ~]# ansible --version
ansible 2.5.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
[root@linuxcnf ~]# 

You can see the version of Ansible installed!!!

No comments:

Post a Comment