No package ansible available

Hi all,

I am having some issues with the task Install Ansible when I run:

sudo yum install epel-release

sudo yum install python-pip

sudo yum install ansible==2.5.7

There is an error:

I have searched around quite a bit and cannot seem to find a solution.

Thanks in advance to anyone who can help:-)

Hello, @juliettet
Did you try from pip command?

sudo pip install -y <package-name>
1 Like

Hi @player001,

Thank you for responding. I did, but it installed the wrong version.

Hi @juliettet

Can you please specify the lab number to help you.
Thanks in advance

1 Like
Hi Juliett,


if you try to install ansible with "yum" ,  you'll have only ansible (2.6,  2.7, 2.8 and 2.9 release available): 
(and not 2.5.7 release)
-------------------------------------------------------------------------------------------------------------

We will install ansible 2.5.7 with an another method:
-----------------------------------------------------

An ansible  repository  with all release of  ansible for Redhat/CentOS/Fedora:
-----------------------------------------------------------------------------
  (i.e  https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/)
  
  
install  wget:
==============
yum install  wget

download ansible 2.5.7 release:
===============================

wget   https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.5.7-1.el7.ans.noarch.rpm 

install  ansible 2.5.7 :
=======================
yum  localinstall  ansible-2.5.7-1.el7.ans.noarch.rpm

check ansible's  version:
========================
ansible  --version

ansible 2.5.7


Good Luck !

1 Like

Hi,

Thank you for responding. Where do I find the lab number? It’s the Install Ansible task.

Thanks:-)

Hi Samer,

Thank you for responding! I am going to try this out now.

That did the trick. Thanks again! :grinning: