Could a newest Ansible 2.17 install on RHEL9.3 or 9.4?

We would like to install newest softwares, Ansible 2.17 on RHEL9.4 because RHEL’s full support is up to 9.
But I can only find the information below.

Are there any information about that compatibility?

Updates to using Ansible Core in Red Hat Enterprise Linux

AFAIK, this is the requirements for the control node; any UNIX-like machine with Python installed

Control node requirements
For your control node (the machine that runs Ansible), you can use nearly any UNIX-like machine with Python installed. This includes Red Hat, Debian, Ubuntu, macOS, BSDs, and Windows under a Windows Subsystem for Linux (WSL) distribution.
Installing Ansible — Ansible Community Documentation

However, there are requirements regarding the version of Python.
The latest Ansible 2.17 requires Python 3.10 - 3.12 for the control node.
Refer to the support matrix: Releases and maintenance — Ansible Community Documentation

In practice, Ansible is tested on several representative OSes before being released. It seems that version 2.17.1 has been tested on RHEL 9.3: ansible/.azure-pipelines/azure-pipelines.yml at v2.17.1 · ansible/ansible · GitHub

1 Like

You will need to use pip (or pipx) to install ansible-core>=2.15.0 on RHEL 9, and as @kurokobo mentioned, you need at least python3.10 (RHEL 9 comes with python3.9 out of the box).

My own RHEL 9.4 sandbox uses the following basic installation steps:

Run as root:

umask 0022
dnf install -y python3.12-pip-wheel
pip3.12 install pipx>=1.5.0 --user
pipx --global install ansible --python=python3.12 --include-deps --system-site-packages
pipx --global inject ansible --include-deps --include-apps ansible-lint ansible-builder ansible-navigator ansible-rulebook ansible-policy
pipx --global ensurepath 

This installs the majority of ansible-* tools into a pipx managed venv, can be upgraded with pipx --global upgrade ansible, and is usable by all users. Feel free to play around with pipx. You may not need/want all users to have access, so exclude the --global option, or you may only want pipx install ansible-core --include-deps --system-site-packages to get ansible-core without any of collections distributed with ansible.

I don’t think pipx --global ensurepath updates $PATH for all users though, so you might have to update separately.


@kurokobo -san,

Thank you for your information. Especially, information that which version of RHEL is tested with Ansible are valuable one !!

@Denney-tech -san,

Thank you for your detailed information!!
I can image the point of installation more specifically!!