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

209 views
Skip to first unread message

Onno

unread,
Dec 17, 2020, 2:57:49 AM12/17/20
to Ansible Project
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?


Jean-Yves LENHOF

unread,
Dec 17, 2020, 3:15:23 AM12/17/20
to ansible...@googlegroups.com
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6567265e-c761-4cc7-ac59-2341d0030d61n%40googlegroups.com.

Matt Martz

unread,
Dec 17, 2020, 9:46:22 AM12/17/20
to ansible...@googlegroups.com
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 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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6567265e-c761-4cc7-ac59-2341d0030d61n%40googlegroups.com.


--
Matt Martz
@sivel
sivel.net

aide...@gmail.com

unread,
Dec 17, 2020, 12:59:53 PM12/17/20
to ansible...@googlegroups.com
You can update python to v3 in centos7

Enviado desde mi iPhone

El 17-12-2020, a la(s) 04:57, Onno <onno.van.d...@gmail.com> escribió:



Matt Martz

unread,
Dec 17, 2020, 1:12:58 PM12/17/20
to ansible...@googlegroups.com
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

Kevin Fenzi

unread,
Dec 17, 2020, 3:39:20 PM12/17/20
to ansible...@googlegroups.com
On Wed, Dec 16, 2020 at 11:57:49PM -0800, Onno wrote:
...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
signature.asc
Reply all
Reply to author
Forward
0 new messages