How to install Ansible in Red Hat Enterprise Linux version 9.3?
Today we're going to talk about the easier way to install and maintain up-to-date Ansible inside RHEL 9.3 with the distribution tools.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
How to install Ansible in RHEL 9.3
- The Ansible Core package
ansible-coreincluded in the RHEL 9.3 AppStream repository
Today we're talking about How to install Ansible in RHEL 9.3.
The good news is that the Ansible Core package (ansible-core) is included out-of-the-box in the RHEL 9.3 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.3 AppStream](https://access.redhat.com/articles/6325611)
- [Using Ansible in RHEL 9.3](https://access.redhat.com/articles/6393321)
## Playbook
Install latest Ansible-Core in RHEL 9.3.
code
- Install-Ansible-RHEL9.3.sh
``bash
#!/bin/bash
sudo dnf install ansible-core
`
execution
``bash
[root@localhost devops]# dnf install ansible
Updating Subscription Management repositories.
Last metadata expiration check: 4:37:26 ago on Wed 22 Nov 2023 04:06:02 AM PST.
No match for argument: ansible
Error: Unable to find a match: ansible
[root@localhost devops]# dnf install ansible-core
Updating Subscription Management repositories.
Last metadata expiration check: 4:37:35 ago on Wed 22 Nov 2023 04:06:02 AM PST.
Dependencies resolved.
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
ansible-core aarch64 1:2.14.9-1.el9 rhel-9-for-aarch64-appstream-rpms 2.6 M
Installing dependencies:
git-core aarch64 2.39.3-1.el9_2 rhel-9-for-aarch64-appstream-rpms 4.4 M
python3-cffi aarch64 1.14.5-5.el9 rhel-9-for-aarch64-baseos-rpms 261 k
python3-cryptography aarch64 36.0.1-4.el9 rhel-9-for-aarch64-baseos-rpms 1.2 M
python3-packaging noarch 20.9-5.e