CentOS 7 is end-of-life when using Ansible?

Hi all,
I stumbled onto the problem
If you require Python 3 support use the dnf Ansible module instead."

This message baffles me. It has for some time and I do not understand what it implies or means.

My conclusion at this point is that CentOS 7 should be considered end-of-life when using Ansible. I’m very much interested in opinions on this matter.

CentOS 7 has Python 2.7.x and Python 2.7.x is EOF jan 2021.

Now of course you can install Python 3 etc but then you there is that message:

If you require Python 3 support use the dnf Ansible module instead."

Most Ansible automation for example on Ansible Galaxy uses the package module. This package module is deprecated for Python 3.

Everywhere package is used, Ansible will barf up that message. On CentOS 7.

You can install dnf etc on CentOS 7, remove yum but this won’t help. The message remains.

Is my understanding correct that CentOS 7 is EOF jan 2020 if you want Python3? Python3 implies CentOS 8 or higher?

Hi,

Statement here could interest you :

https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html

Regards,

We have no current plans of dropping Python 2 support for modules in the near future. With EL 7 EOL scheduled for 2024, it’s possible that we continue python2 support for modules until then.

You can update python to v3 in centos7

While you can install python3 on CentOS, they do not provide yum or selinux python bindings for Python3. Which makes it not totally useful in the context of many things done via Ansible.

In short, you generally need to use the system python for many operations.

Red Hat, and by extension CentOS will continue supporting Py2.7 even after it is EOL. See https://access.redhat.com/solutions/4455511

...snip...

Is my understanding correct that CentOS 7 is EOF jan 2020 if you want
Python3? Python3 implies CentOS 8 or higher?

Well, I think it's more nuanced than that. CentOS/RHEL7 now does have
python3.6 shipped with it, but of course it doesn't have all the modules
that python2 has there.

If your control host is rhel/centos7 and any of your target hosts are
rhel/centos7 then yeah, you can't use python3 ansible and the package
module. (since it requires the python2 yum bindings).

python3 ansible should work for the other cases.. where you have newer
target hosts, don't use package module, etc.

kevin