I checked the repos for both RedHat and Debian-based distros and saw that the latest versions of Ansible still require Python2.7 and wanted to see if there will be a point these packages flip to using Python3. I guess I can compile Ansible with Python3 by hand, but I’d rather it become a repo package that continues with Py3 as things get updated.
Red hat Enterprise Linux 7 ships with python 2.7 so we won’t be able to switch to python 3 there. You could take a look at the Fedora packages of ansible, though, i believe that they’ve switched over to building against python3 in the current releases and you can probably adapt the spec file to your needs if you have your own build of python3.
Ubuntu is an interesting question. We probably could change the dependencies there. I’m not sure if we need to coordinate that with the tower team, though.
-Toshio
It would be great if the Ubuntu PPA offered python3. This could behaving two packages, one for each. Currently I use pip3 to install it, but using the PPA is faster and provides easier updating.
The latest versions of Ubuntu now ship with Python3 installed, so being able to utilize that going forward would be extremely helpful.
Red hat Enterprise Linux 7 ships with python 2.7 so we won't be able to switch to python 3 there. You could take a look at the Fedora packages of ansible, though, i believe that they've switched over to building against python3 in the current releases and you can probably adapt the spec file to your needs if you have your own build of python3.
To elaborate on what Toshio said, Fedora 29 (current latest stable
release) is python3 by default for Ansible[0] and according to the
Fedora DistGit repo for Ansible[1] the version of Ansible for EPEL8
(once RHEL8 is released GA and EPEL[2] is branched/built for RHEL8)
will be python3 only also.
I'm going to be packaging Ansible Core for RHEL8 and plan to target
the python36 AppStream[3] as this will be default association with
Platform Python[4] as per the RHEL8 Beta documentation. Also note, the
blog I wrote about RHEL8 Beta + Ansible[5] for info on how to get up
and running with Ansible Core on RHEL8 Beta explicitly targets
python3.
Ubuntu is an interesting question. We probably could change the dependencies there. I'm not sure if we need to coordinate that with the tower team, though.
+1
I'm Release Manager[6] for Ansible 2.8 and will see if we can
reasonably switch to python3 in our PPA
-AdamM
[0] - https://fedoraproject.org/wiki/Changes/Ansible_python3_default
[1] - https://src.fedoraproject.org/rpms/ansible
[2] - https://fedoraproject.org/wiki/EPEL
[3] - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html/8.0_beta_release_notes/distribution_of_content_in_rhel_8#repositories
[4] - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html/configuring_basic_system_settings/using-python3
[5] - https://www.ansible.com/blog/integrating-ansible-and-red-hat-enterprise-linux-8-beta
[6] - https://docs.ansible.com/ansible/devel/roadmap/ROADMAP_2_8.html