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
Answer from Aryan Srivastava on Stack OverflowIf 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
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
How do i setup ansible in RHel 8.x offline system?
Updates to using Ansible Core in Red Hat Enterprise Linux
Updates to using Ansible in RHEL 8.6 and 9.0
Ansible Tower / AWX - How to Install Ansible AWX without Docker on CentOS 7 / RHEL 7 - YallaLabs
Videos
im totally new to rhel .The internal repos doesn’t have ansible and required dependencies.Any help would do