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 On Thu, Dec 17, 2020 at 11:59 AM <[email protected]> wrote: > You can update python to v3 in centos7 > > Enviado desde mi iPhone > > El 17-12-2020, a la(s) 04:57, Onno <[email protected]> > escribió: > > > 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? > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/6567265e-c761-4cc7-ac59-2341d0030d61n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/6567265e-c761-4cc7-ac59-2341d0030d61n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CE6D4E34-D096-4ACF-BAEB-E19673307FDE%40gmail.com > <https://groups.google.com/d/msgid/ansible-project/CE6D4E34-D096-4ACF-BAEB-E19673307FDE%40gmail.com?utm_medium=email&utm_source=footer> > . > -- Matt Martz @sivel sivel.net -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v8tjn%3Dpe9mKeOcVTbP2WYRc3TSvKqbt26gowtBRh_mtKg%40mail.gmail.com.
