Skip to content

Conversation

@steelhead31
Copy link
Contributor

@steelhead31 steelhead31 commented Dec 17, 2025

Fixes #4118

Amend DNF/yum installation processes to run via command line rather than via ansible builtin modules.

RHEL8 has a system python of 3.6.8 which dictates how dnf and yum behave.
When running via Ansible with a version of 2.18 or later, the system python and ansible on the controller are incompatible, and this error occurs.

TASK [Common : YUM upgrade all packages] ***************************************
fatal: [169.63.185.12]: FAILED! => {"changed": false, "msg": "Could not import the dnf python module using /usr/bin/python3.9 (3.9.20 (main, Aug 23 2025, 13:51:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-28)]). Please install `python3-dnf` package or ensure you have specified the correct ansible_python_interpreter. (attempted ['/usr/libexec/platform-python', '/usr/bin/python3', '/usr/bin/python'])", "results": []}

PLAY RECAP *********************************************************************

This may impact RHEL9+ in the future as ansible and python versions progress.

Checklist

VPC In Progress: https://ci.adoptium.net/job/VagrantPlaybookCheck/2239/

05:58:02.674 VagrantPlaybookCheck » Ubuntu2204,vagrant completed with result SUCCESS
07:52:50.293 VagrantPlaybookCheck » CentOS7,vagrant completed with result SUCCESS
07:52:50.295 VagrantPlaybookCheck » CentOS8,vagrant completed with result SUCCESS
07:52:50.295 VagrantPlaybookCheck » Fedora40,vagrant completed with result SUCCESS

Rerun Failed Due To Node Issue: https://ci.adoptium.net/job/VagrantPlaybookCheck/2240/

@steelhead31 steelhead31 requested a review from sxa December 17, 2025 15:43
@steelhead31 steelhead31 marked this pull request as ready for review December 17, 2025 15:46
Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm intrigued - shouldn't this affect CentOS (Stream) too which should have identical versions of things?

@steelhead31
Copy link
Contributor Author

I'm intrigued - shouldn't this affect CentOS (Stream) too which should have identical versions of things?

I'd have thought so, but it doesnt... the way the system dnf/yum works is different to RHEL, where RHEL has that odd fixed system python, used by things like dnf/yum, centos doesnt do that.

@steelhead31 steelhead31 requested a review from sxa January 5, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean RHEL8 system from IBM Cloud cannot run due to python dependency issue

3 participants