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 Overflow
🌐
Ansible
docs.ansible.com › ansible › 2.9 › installation_guide › intro_installation.html
Installing Ansible — Ansible Documentation
$ sudo subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms · To enable the Ansible Engine repository for RHEL 7, run the following command: $ sudo subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
Discussions

How do i setup ansible in RHel 8.x offline system?
Ever since RHEL 8.6, ansible-core and rhel-system-roles packages are included in the base repos for RHEL. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/8.6_release_notes/index#enhancement_red-hat-enterprise-linux-system-roles https://access.redhat.com/articles/6393361 So you have the basic tools available, and past that it’s a matter of downloading whatever roles or collections you need from Ansible-galaxy and installing them. More on reddit.com
🌐 r/ansible
13
12
May 27, 2023
Updates to using Ansible Core in Red Hat Enterprise Linux
So…. newer (9) RHEL release branch gets permanently stuck with a lower Ansible Core version than an older (8) RHEL release branch? How does this make sense? More on reddit.com
🌐 r/redhat
21
21
November 14, 2023
Updates to using Ansible in RHEL 8.6 and 9.0
Custom or third-party Ansible content may not function correctly with Ansible Core. Please contact your Red Hat Account team to discuss options, including an Ansible Automation Platform subscription. So we should go back to the Open Source Ansible instead of the RedHat binaries. Got it. Thanks! More on reddit.com
🌐 r/redhat
14
43
April 20, 2022
Ansible Tower / AWX - How to Install Ansible AWX without Docker on CentOS 7 / RHEL 7 - YallaLabs
16K subscribers in the CentOS community. CentOS (Community Enterprise Operating System) was a Linux distribution that attempted to provide a free… More on reddit.com
🌐 r/CentOS
4
11
April 15, 2019
🌐
Red Hat
redhat.com › en › blog › ansible-quick-start
Quick start guide to Ansible for Linux sysadmins
November 24, 2025 - # subscription-manager repos --enable ... on the RHEL 8 control node after registering with the Satellite server, run the command yum install ansible....
🌐
LinuxConfig
linuxconfig.org › home › how to install and configure ansible on redhat enterprise linux 8
Install Ansible on RHEL 8 - Step-by-Step Guide.
September 22, 2025 - Learn how to install Ansible on RHEL 8 step-by-step, configure Python, set up SSH, and manage inventory files with our detailed guide.
🌐
Ansible Pilot
ansiblepilot.com › articles › how-to-install-ansible-in-rhel-8-ansible-install
How to install Ansible in RedHat Enterprise Linux (RHEL) 8 ...
Master Ansible automation with expert tutorials, practical examples, and resources. Learn from Luca Berton's books and guides on DevOps, Kubernetes, and cloud infrastructure.
🌐
Linux Hint
linuxhint.com › install_configure_ansible_rhel8
Install and configure Ansible automation on RHEL 8 – Linux Hint
The RHEL 8 system will serve as our Ansible Control node, from where we will connect to and manage the remote Ubuntu 18.04 Server. Let’s jump right in! To install Ansible, first log in to your system and update the system packages using the command:
Find elsewhere
🌐
GoLinuxCloud
golinuxcloud.com › home › ansible tutorial › ansible installation guide on rhel/centos 8
Ansible Installation Guide on RHEL/CentOS 8 | GoLinuxCloud
January 1, 2024 - ~]# subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms · Install Ansible Engine using default package manager: ~]# dnf -y install ansible · If you are on CentOS 8 then you will need access to respective EPEL repository ...
🌐
CloudThat
cloudthat.com › home › blogs › how to install ansible on rhel 8
How to Install Ansible on RHEL 8 - CloudThat Resources
June 25, 2024 - This blog states the steps involved in installing Ansible on a Red Hat server and managing another server using the master instance. I will be using 2 AWS instances with RHEL. Continue reading...
🌐
CSContents
cscontents.com › home › how to install ansible in rhel 8 – a simple & practical guide
How to install Ansible in RHEL 8 - simple & practical guide
April 15, 2023 - Ansible is a very powerful open-source IT automation tool. On RHEL ansible can be installed using the package manager or pip module of Python.
🌐
TecMint
tecmint.com › home › linux distros › centos › how to install ansible automation tool on centos/rhel 8
How to Install Ansible Automation Tool on CentOS/RHEL 8
October 8, 2019 - In this tutorial, you will learn how to install and configure the Ansible automation tool on RHEL/CentOS 8 Linux distribution.
🌐
ComputingForGeeks
computingforgeeks.com › home › ansible › install and configure ansible on rhel 8 / centos 8
Install and Configure Ansible on RHEL 8 / CentOS 8 | ComputingForGeeks
June 11, 2020 - Install and Set your default Python on RHEL 8 using the guide below. ... Once it has been installed, proceed to install Pip which is a Python package manager used to install Ansible.
🌐
Topvcf
topvcf.com › 2025 › 06 › 26 › install-rhel-8-install-ansible-initial-config-and-first-playbook
Install rhel 8, install ansible, initial config and first playbook – TOP VCF technology
June 26, 2025 - install ansible ---------------------------- sudo su - cat /etc/redhat-release yum repolist all | grep ansible yum install yum-utils yum-config-manager --enable ansible-2.9-for-rhel-8-x86_64-rpms yum repolist enabled yum install -y ansible ansible --version setup user on control node and all managed nodes ------------------------------------------- #on control and manage nodes useradd -m ansible passwd ansible echo "ansible ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers generate ssh pair on control node and copy to manage node ---------------------------------------------- #on control node login as
🌐
Spacelift
spacelift.io › blog › how-to-install-ansible
How to Install Ansible on Ubuntu, RHEL, macOS & CentOS
#Install python3 and pip on CentOS: Sudo yum install epel-release Sudo yum install python3-pip #Install python3 and pip on RHEL: sudo dnf install --assumeyes python3-pip #Install python3 and pip on MacOS: /bin/bash -c "$(curl -fsSL ...
Published   October 10, 2025
🌐
LinuxTechi
linuxtechi.com › home › how to › how to install ansible (automation tool) on centos 8/rhel 8
How to Install Ansible (Automation Tool) on CentOS 8/RHEL 8
December 11, 2019 - [pkumar@linuxtechi ~]$ sudo subscription-manager repos --enable ansible-2.8-for-rhel-8-x86_64-rpms · Once the repo is enabled then execute the following dnf command to install Ansible,
🌐
Medium
medium.com › @sumitnair89 › how-to-install-ansible-on-rhel-8-f2c9d7c5dc8a
How to Install Ansible on AWS EC2 Instance RHEL 8 | by Sumit | Medium
March 12, 2020 - In RHEL 8, Ansible cannot be installed as a root user. So, we are going to install Ansible after switching user to the one which we created earlier in Step 4.
🌐
Medium
medium.com › analytics-vidhya › ansible-installation-on-redhat8-d1d4a7f60ada
Ansible Installation on RedHat8. Intro | by Akashdeep Gupta | Analytics Vidhya | Medium
October 9, 2020 - Ansible offers a simple architecture ... to be installed on nodes. It also provides a robust set of features and built-in modules which facilitate writing automation scripts. Ansible is the preferred configuration tool when it is compared with similar tools like Puppet, Chef, and Salt because it doesn’t need an agent and it works on SSH and python. RHEL 8 server with ...
🌐
Medium
chetna-manku.medium.com › how-to-install-and-configure-ansible-on-rhel8-f6a055d0ea9d
How to Install and Configure ANSIBLE on RHEL8 | by Chetna Manku | Medium
January 31, 2021 - To install Ansible, you need Python pre-installed on your system. By default, RHEL8 comes with Python3 installed.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_ansible_inside › 1.1 › html-single › red_hat_ansible_inside_installation_guide › index
Red Hat Ansible Inside Installation Guide | Red Hat Ansible Inside | 1.1 | Red Hat Documentation
sudo subscription-manager repos --enable=ansible-inside-1.1-for-rhel-8-x86_64-rpms · RHEL 9 · sudo subscription-manager repos --enable=ansible-inside-1.1-for-rhel-9-x86_64-rpms · After the repository is enabled, you can proceed with installing the Ansible components.