AnsiblePilot — Master Ansible Automation
AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 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 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", 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 Rocky Linux 9 - Ansible install — Video Tutorial
Install Ansible on Rocky Linux 9 with this updated 2026 guide. Step-by-step instructions using EPEL repository and pip.
What You'll Learn
- How to install Ansible in Rocky Linux version 9.
- How to install Ansible in Rocky Linux 9
- Links
- Playbook
- code
- execution
- before execution
- after execution
- Conclusion
- Related Articles
Full Tutorial Content
How to install Ansible in Rocky Linux version 9.
Today we’re going to talk about the easier way to install and maintain Ansible inside Rocky Linux 9 using the appstream system repository.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
How to install Ansible in Rocky Linux 9
- `ansible-core` included in AppStream repository
- `ansible` package not available
Today we’re talking about How to install Ansible in Rocky Linux 9.
The easier way to install and maintain up-to-date Ansible inside Rocky Linux version 9 is using the `ansible-core` package included in the AppStream distribution repository.
Please notice that the package `ansible` isn’t available anymore.
It’s not necessary to use the additional EPEL package repository.
See also:
[Ansible terminology - ansible vs ansible-core packages](/articles/ansible-terminology-ansible-vs-ansible-core-packages).
Links
- [Rocky Linux 9.0 Available Now](https://rockylinux.org/news/rocky-linux-9-0-ga-release/)
Playbook
Let’s jump into a quick live Playbook of how to install the latest version of Ansible in Rocky Linux.
I’m going to install the `ansible-core` package in an Rocky Linux 9 using the AppStream distribution repository.
code
- Install-Ansible-RockyLinux9.sh
```bash
#!/bin/bash
sudo dnf install ansible-core
```
execution
```bash
ansible-pilot $ ssh devops@rockylinux.example.com
Last login: Tue Jul 19 11:17:44 2022 from 192.168.43.5
[devops@rockylinux ~]$ sudo su
[root@rockylinux devops]# cat /etc/redhat-release
Rocky Linux release 9.0 (Blue Onyx)
[root@rockylinux devops]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.0 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.0"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.0 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.0"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.0"
[root@rockylinux devops]# hostnamectl
Static hostname: rockylinux.example.com
Icon name: computer-vm
Chassis: vm 🖴
Machine ID: 26419e43cdb741a2a2068070219bf8d9
Boot ID: bed36d9812744b248bc8f674343c83c9
Virtualization: oracle
Operating System: Rocky Linux 9.0 (Blue Onyx)
CPE OS Name: cpe:/o:rocky:rocky:9::baseos
Kernel: Linux 5.14.0-70.13.1.el9_0.x86_64
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox
[root@rockylinux devops]# uname -a
Linux rockylinux.example.com 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Wed May 25 21:01:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@rockylinux devops]# dnf search ansible
Last metadata expiration check: 1:08:16 ago on Tue 19 Jul 2022 10:15:38 AM UTC.
================================= Name & Summary Matched: ansible =================================
ansible-collection-microsof
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 9 min
- Category: installation
Read the full written article: How to install Ansible in Rocky Linux 9 - Ansible install