Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install older package of ansible?

Tags:

ansible

rpm

yum

I need to install ansible 2.1.0.0-1.el7. My setup does not work with the newest version of ansible which I installed with:

yum -y --enablerepo=epel install ansible

This gave me ansible-2.2.0.0-3.el7.noarch. So I tried to list the older versions but I could not find them:

# yum -y --enablerepo=epel --showduplicates list ansible
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror2.hs-esslingen.de
 * epel: epel.mirrors.ovh.net
 * extras: it.centos.contactlab.it
 * updates: mirror.netcologne.de
Available Packages
ansible.noarch                    2.2.0.0-3.el7                                epel

This is a site where I found multiple versions but I don't know how to install it.

Can someone help me to install the Ansible version I need?

like image 508
DenCowboy Avatar asked Nov 17 '16 17:11

DenCowboy


People also ask

Does Ansible 2.9 require Python 3?

Control Machine RequirementsCurrently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed.

What is PIP install Ansible?

Today we're talking about How to install Ansible with PIP. PIP is the Python package manager and is going to take care of all the processes and manage the necessary dependency. It takes care of the download and installs process of packages directly from PyPI. PIP is designed to be OS-independent.


1 Answers

You should install it with python pip.

sudo yum install python-pip python-devel python

And then:

sudo pip install pip --upgrade
sudo pip install ansible==2.1.0.0

And now you should be able to use:

ansible-playbook ...

If you don't manage to install pip with the command I gave you, have a look here: https://packaging.python.org/install_requirements_linux/

like image 196
Bruno B. Carvalho Avatar answered Oct 07 '22 18:10

Bruno B. Carvalho