How to install Ansible on Red Hat Enterprise Linux

Ansible Installation Steps on Redhat Linux

1. Add the EPEL Repo First 

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Note :Check epel repo with below command

[root@unixplanetary ansible]# yum repolist epel
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 12,206
repolist: 12,206
[root@unixplanetary ansible]#

2. Installing Ansible

[root@unixplanetary ansible]# yum -y install ansible
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
–> Running transaction check
—> Package ansible.noarch 0:2.4.2.0-1.el7 will be installed
–> Processing Dependency: python-crypto for package: ansible-2.4.2.0-1.el7.noarch
–> Processing Dependency: python-httplib2 for package: ansible-2.4.2.0-1.el7.noarch
–> Processing Dependency: python-keyczar for package: ansible-2.4.2.0-1.el7.noarch

3. Installation is Successful, Check the Ansible Version

[root@unixplanetary ansible]# ansible –version
ansible 2.4.2.0
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, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] [root@unixplanetary ansible]#

Leave a Reply

Your email address will not be published. Required fields are marked *