How to install Ansible in Red Hat Enterprise Linux version 9?
Today we're going to talk about the easier way to install and maintain Ansible inside RHEL 9 with the distribution tools.
I'm Luca Berton and welcome to today's episode of Ansible Pilot.
How to install Ansible in RHEL 9
- The Ansible Core package
ansible-coreincluded in the RHEL 9 AppStream repository
Today we're talking about How to install Ansible in RHEL 9.
The good news is that the Ansible Core package (ansible-core) is included out-of-the-box in the RHEL 9 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 AppStream](https://access.redhat.com/articles/6325611)
- [Using Ansible in RHEL 9](https://access.redhat.com/articles/6393321)
## Playbook
Install latest Ansible-Core in RHEL 9.
code
- Install-Ansible-RHEL9.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 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-rpms 39 k
perl-DynaLoader x86_64 1.47-479.el9