Handling Ansible Core 2.18 Upgrades with RHEL 8.10 Targets

Hey everyone!

We’ve been using Ansible for about two years to manage complex deployments. To simplify our approach, we use a custom Debian container that houses our playbooks and the Ansible Core version.

We started on Ansible Core 2.16 and are now trying to upgrade to 2.18. However, we’ve run into issues with our RHEL 8.10 target servers. We realized that each Ansible version has a minimum Python requirement, and RHEL 8.10 defaults to Python 3.6, which is no longer supported by newer Ansible versions.

We tried upgrading the target servers to Python 3.12, but we found that while the core Python works, many essential modules (like dnf) aren’t available for 3.12 on RHEL 8.

The majority of our fleet is RHEL 9, but we still have several RHEL 8 systems to maintain. We’re currently considering two paths:

  1. Maintaining two environments: Ansible Core 2.16 for RHEL 8 and the latest Ansible Core for RHEL 9/10.
  2. Dropping advanced modules (like dnf) for RHEL 8 and using the command or shell modules instead.

Are these our only options? How are other admins managing RHEL 8.10 systems today? Are you staying on older Ansible Core versions, or is there a better way to handle the Python dependency that we’ve missed?

I don’t know if this helps, but ansible-core 2.18 supports Python 3.8 - 3.13 on the target.

Maybe this is also available on RHEL 8.10 and works better for you.

dnf is effectively unsupported on RHEL8 from ansible-core 2.17+ due to the missing python bindings for dnf on RHEL8 for newer python versions.

2.21 will restore dnf functionality on RHEL8, but will still require at least python3.9 to also be installed on the RHEL8 machines:

3 Likes

For the record: ETA for 2.21 is 2026-05-18.

So, the best strategy would be to upgrade RHEL 8.10 to python 3.9 and wait for the 2.21.
Are there other modules that we will have problem with?
Will 2.21 still work on python 3.9 ?

According to the ansible-core support matrix: Yes for the target, but you’ll need Python 3.12 - 3.14 on the control node (your Debian container).

BTW ansible-core 2.21.0b2 has been released recently. You can use it to test if 2.21 will (presumably) work for you.

Make sure and check the Ansible Core Porting Guides, there have been quite some changes since 2.16. IIRC especially 2.19 introduced a lot.