How to install Ansible in Red Hat Enterprise Linux version 9.1?
Today we're going to talk about the easier way to install and maintain up-to-date Ansible inside RHEL 9.1 with the distribution tools.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
How to install Ansible in RHEL 9.1
- The Ansible Core package
ansible-coreincluded in the RHEL 9.1 AppStream repository
Today we're talking about How to install Ansible in RHEL 9.1.
The good news is that the Ansible Core package (ansible-core) is included out-of-the-box in the RHEL 9.1 AppStream repository.
No more additional repository (Ansible Engine or EPEL) like previous versions for basic automation.
However, for additional support for the underlying platform and Core-maintained modules is required the Ansible Automation Platform subscription.
See also:
[Ansible terminology - ansible vs ansible-core packages](/articles/ansible-terminology-ansible-vs-ansible-core-packages).
Link
- [Scope of support for the Ansible Core package included in the RHEL 9.1 AppStream](https://access.redhat.com/articles/6325611)
- [Using Ansible in RHEL 9.1](https://access.redhat.com/articles/6393321)
## Playbook
Install latest Ansible-Core in RHEL 9.1.
code
- Install-Ansible-RHEL9.1.sh
``bash
#!/bin/bash
sudo dnf install ansible-core
`
execution
``bash
dnf install ansible-core
Updating Subscription Management repositories.
Dependencies resolved.
=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
ansible-core aarch64 2.13.3-1.el9 rhel-9-for-aarch64-appstream-rpms 2.7 M
Installing dependencies:
git-core aarch64 2.31.1-2.el9.2
rhel-9-for-aarch64-appstream-rpms 3.7 M
python3-cffi aarch64 1.14.5-5.el9 rhel-9-for-aarch64-appstream-rpms 261 k
python3-cryptography
aarch64 36.0.1-2.el9 rhel-9-for-aarch64-appstream-rpms 1.2 M
python3-packaging noarch 20.9-5.el9 rhel-9-for-aarch64-appstream-rpms 81 k
python3-ply noarch 3.11-14.el9 rhel-9-for-aarch64-appstream-rpms 111 k
python3-pycparser noarch 2.20-6.el9 rhel-9-for-aarch64-appstream-rpms 139 k
python3-pyparsing noarch 2.4.7-9.el9 rhel-9-for-aarch64-baseos-rpms 154 k
python3-resolvelib noarch 0.5.4-5.el9 rhel-9-for-aarch64-appstream-rpms 38 k
sshpass aarch64 1.09-4.el9 rhel-9-for-aarch64-appstream-rpms 30 k
Transaction Summary
=================================================================================
Install 10 Packages
Total download size: 8.3 M
Installed size: 34 M
Is this ok [y/N]: y
Downloading Packages:
(1/10): python3-pyparsing-2.4.7-9.el9.noarch.rpm 87 kB/s | 154 kB 00:01
(2/10): python3-resolvelib-0.5.4-5.el9.noarch.rp 21 kB/s | 38 kB 00:01
(3/10): sshpa