How to install Ansible on RHEL6 server


#1

Dear Team,

We are planning to install and configure Ansible on production server. As I have search on internet. I got few link which says to configure EPEL repo on server. On PROD server, We can’t provide internet access.

Is there any other way to install Ansible offline ? I will prefer tar file means install ansible by compile base. Or we can install ansible rpm.

I have faced few difficulties i.e. I am not getting all rpm which is necessary to install ansible [ dependencies error ]. Even, I got ansible tar file link. But, I am not getting any steps to install it.

You can check below link :
http://releases.ansible.com/ansible/

I have download it but I don’t have steps to install it.

Please guide.

Regards,
Rajesh Kathar


#2

@rajeshkathar

Hi Rajesh ansible is available in epel repo in your case create local repository for epel (use rsync to sync all the packages form epel to your local server) and use ftp or nfs or httpd any of service for publishing the created repository.

look at the below link for creating local repository

https://www.tecmint.com/setup-yum-repository-in-centos-7/

form here you can get all the packages from epel repository, by using this link you can create local repo for epel.

After configuring required stuff you can install ansible by using yum

#yum install ansible

#3

Download package from http://dl.fedoraproject.org/pub/epel/6/x86_64//ansible-2.3.1.0-1.el6.noarch.rpm and copy to prod server using usb stick.
Then use command:
yum install /tmp/ansible-2.3.1.0-1.el6.noarch.rpm