# Handling Ansible Core 2.18 Upgrades with RHEL 8.10 Targets

**URL:** <https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670>\
**Category:** Get Help\
**Tags:** rhel\
**Created:** [April 13, 2026, 3:17pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670 "2026-04-13T15:17:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![uk1988](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/uk1988/32/10590_2.png) [@uk1988](https://forum.ansible.com/u/uk1988)\
**Post date:** [April 13, 2026, 3:17pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/1 "2026-04-13T15:17:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [April 13, 2026, 3:22pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/2 "2026-04-13T15:22:16Z")

</div>

I don’t know if this helps, but ansible-core 2.18 [supports](https://docs.ansible.com/projects/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix) Python 3.8 - 3.13 on the target.

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

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 13, 2026, 3:27pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/3 "2026-04-13T15:27:01Z")

</div>

`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:

> <https://github.com/ansible/ansible/pull/86432>
>
> \##### SUMMARY
> 
> This PR aims to allow the core modules to execute against newer… python versions where python bindings are absent, by including a separate file to interact with the older python version where the bindings are available.
> 
> Effectively, for the case of the \`dnf\` module, this splits the module into 2 parts, the module, and a custom JSONRPC CLI for performing DNF actions.
> 
> Included in this PR:
> 
> \- \`dnf\` - Separate module into module and utility script
> \- \`package\_facts\` - Switch from \`rpm\` python to \`rpm\` CLI to list packages
> \- \`ansible-test\` - Add limited RHEL8 integration test remote supporting Python 3.12 only
> \- \`ansiballz\` - Add tech preview to embed arbitrary files, not relying on python \`import\`
> 
> \##### ISSUE TYPE
> 
> \- Feature Pull Request

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [April 13, 2026, 4:45pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/4 "2026-04-13T16:45:01Z")

</div>

For the record: ETA for 2.21 is [2026-05-18](https://docs.ansible.com/projects/ansible/devel/roadmap/ROADMAP_2_21.html#release-phase).

---

<div class="post-metadata">

**Author:** ![uk1988](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/uk1988/32/10590_2.png) [@uk1988](https://forum.ansible.com/u/uk1988)\
**Post date:** [April 14, 2026, 6:24am UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/5 "2026-04-14T06:24:08Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [April 14, 2026, 2:47pm UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/6 "2026-04-14T14:47:08Z")

</div>

> [@uk1988](#):
>
> Will 2.21 still work on python 3.9?

According to the [ansible-core support matrix](https://docs.ansible.com/projects/ansible/devel/reference_appendices/release_and_maintenance.html#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](https://forum.ansible.com/t/45674) 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](https://docs.ansible.com/projects/ansible-core/devel/porting_guides/core_porting_guides.html), there have been quite some changes since 2.16. IIRC especially 2.19 introduced a lot.

---

<div class="post-metadata">

**Author:** ![uk1988](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/uk1988/32/10590_2.png) [@uk1988](https://forum.ansible.com/u/uk1988)\
**Post date:** [April 17, 2026, 7:40am UTC](https://forum.ansible.com/t/handling-ansible-core-2-18-upgrades-with-rhel-8-10-targets/45670/7 "2026-04-17T07:40:43Z")

</div>

Thank you for the feedback! What about other modules, such as `ansible.builtin.firewalld`?  
Is it perhaps best practice for RHEL 8.10 compatibility to stick with shell commands, especially if we don’t have many tasks?
