skip to Main Content

I want to install ansible in RHEL 8 Centos.
To use yum install ansible i must enable epel release but i can’t find a best source of epel release for Rhel 8.

I tried this

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

sudo yum install ansible

The output i got is

Last metadata expiration check: 0:01:26 ago on Sun 11 Aug 2019 12:21:55 PM UTC.
Error:
 Problem: conflicting requests
  - nothing provides python-setuptools needed by ansible-2.8.2-1.el7.noarch
  - nothing provides python-jinja2 needed by ansible-2.8.2-1.el7.noarch
  - nothing provides python-six needed by ansible-2.8.2-1.el7.noarch
  - nothing provides PyYAML needed by ansible-2.8.2-1.el7.noarch
  - nothing provides python2-cryptography needed by ansible-2.8.2-1.el7.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

3

Answers


  1. EPEL8 is not released yet. There are some packages available, but a lot are still being worked on and the repo is not considered “generally available”.

    For now, you can install Ansible from the Python Package Index (PyPI):

    yum install python3-pip
    pip3 install ansible
    
    Login or Signup to reply.
  2. If you are using RHEL 8 then you can use the subscription manager to get Ansible with the host and config file pre-built.

    Also, you will need to create an account on https://developers.redhat.com before you can do this:

    subscription-manager register --auto-attach
    
    subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms
    
    yum -y install ansible
    
    ansible --version
    
    Login or Signup to reply.
  3. This worked for RHEL9 Should work for RHEL8 as well

    [root@controller yum.repos.d]# yum list | grep  ansible
    ansible-collection-microsoft-sql.noarch              1.1.1-3.el9_0                      Local-AppStream
        ansible-collection-redhat-rhel_mgmt.noarch           1.0.0-2.el9                        Local-AppStream
        ansible-core.x86_64                                  2.12.2-1.el9                       Local-AppStream
        ansible-freeipa.noarch                               1.6.3-1.el9                        Local-AppStream
        ansible-freeipa-tests.noarch                         1.6.3-1.el9                        Local-AppStream
        ansible-pcp.noarch                                   2.2.2-2.el9                        Local-AppStream
        ansible-test.x86_64                                  2.12.2-1.el9                       Local-AppStream
    [root@controller yum.repos.d]# yum install ansible-core.x86_64
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search