AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.
Popular Topics
About Luca Berton
Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.
How to install Ansible in RedHat Enterprise Linux (RHEL) 8 with Ansible Engine - Ansible install — Video Tutorial
How to install the latest and a specific version of Ansible in Red Hat Enterprise version 8 using Ansible Engine software collection.
What You'll Learn
- How to install Ansible in RHEL 8
- Demo
- code
- Execution
- Verification
- Conclusion
- Related Articles
Full Tutorial Content
How to install Ansible in Red Hat Enterprise Linux version 8.
Today we’re going to talk about the easier way to install and maintain Ansible inside RHEL 8 with the distribution tools.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
How to install Ansible in RHEL 8
Today we’re talking about How to install Ansible in RHEL 8.
The easier way to install and maintain Ansible inside Red Hat Enterprise Linux version 8 with the distribution tools.
The repository that contains Ansible is called the Ansible Engine software collection.
The main advantage of using software collection is that you don’t require any external repository such as EPEL for this content.
Software Collections are fully supported by Red Hat and included in your subscription plan.
Demo
Are you ready to make your hands dirty?
Let’s jump in a quick live Playbook of how to install the latest and a specific version of Ansible in RHEL8.
RedHat Enterprise Linux (RHEL) 8 supports `ansible-core` via the
- [AppStream repository since RHEL 8.6](https://www.redhat.com/en/blog/updates-using-ansible-rhel-86-and-90)
- [Extra Packages for Enterprise Linux (EPEL) repository](https://docs.fedoraproject.org/en-US/epel/)
code
```bash
#!/bin/bash
sudo subscription-manager register
sudo subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
sudo yum install ansible
```
Execution
```bash
dnf install ansible-core
Updating Subscription Management repositories.
Dependencies resolved.
===================================================================================================
Package Arch Version Repository Size
===================================================================================================
Installing:
ansible-core x86_64 2.12.2-1.el9 rhel-9-for-x86_64-appstream-rpms 2.4 M
Installing dependencies:
emacs-filesystem noarch 1:27.2-6.el9 rhel-9-for-x86_64-appstream-rpms 10 k
git x86_64 2.31.1-2.el9.2 rhel-9-for-x86_64-appstream-rpms 128 k
git-core x86_64 2.31.1-2.el9.2 rhel-9-for-x86_64-appstream-rpms 3.6 M
git-core-doc noarch 2.31.1-2.el9.2 rhel-9-for-x86_64-appstream-rpms 2.5 M
perl-AutoLoader noarch 5.74-479.el9 rhel-9-for-x86_64-appstream-rpms 31 k
perl-B x86_64 1.80-479.el9 rhel-9-for-x86_64-appstream-rpms 194 k
perl-Carp noarch 1.50-460.el9 rhel-9-for-x86_64-appstream-rpms 31 k
perl-Class-Struct noarch 0.66-479.el9 rhel-9-for-x86_64-appstream-rpms 32 k
perl-Data-Dumper x86_64 2.174-462.el9 rhel-9-for-x86_64-appstream-rpms 59 k
perl-Digest noarch 1.19-4.el9 rhel-9-for-x86_64-appstream-rpms 29 k
perl-Digest-MD5 x86_64 2.58-4.el9 rhel-9-for-x86_64-appstream-rpm
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 5 min
- Category: installation
Read the full written article: How to install Ansible in RedHat Enterprise Linux (RHEL) 8 with Ansible Engine - Ansible install