`ansible-playbook` (`ansible-core 2.17.1`) fails on target with `python 3.9`

The thing with EL8 platforms is that they do support Python version 3.7 and up. However, the issue lies in /usr/libexec/platform-python, which is version 3.6.8. There’s been a few blogs about when RHEL8 was released in 2019: What, no Python in Red Hat Enterprise Linux 8? | Red Hat Developer

The reasoning behind it was, having an OS which has to use the same version of Python as it’s main interpreter for 10+ years is not technically feasable (and comes with a myriad of problems, security and otherwise). Let’s instead decouple the “system” python interpreter from the “userland” interpreter (I use these terms loosely here).

And here’s where Ansible 2.17+ breaks: using “system” modules that require platform-python to work. You can run any and all modules on your RHEL8 targets, provided they have a suitable python interpreter, except modules that use “system” python, such as DNF/YUM.

2 Likes