We're happy to announce that the Ansible 5.0.0 package has been released !
Ansible 5.0.0 includes the newly released ansible-core 2.12 as well as
a curated set of Ansible collections to provide a vast number of
modules and plugins.
This is a major version update from Ansible 4.x which included
ansible-core 2.11 and there may be backwards incompatibilities in the
core playbook language.
Please see the porting guide (linked at the bottom) for details.
It has problems, and I'm new here. What is the best place to report
issues with the bundling, rather than individual repos? The pypi.org
reference points to the https://github.com/ansible/ansible/, which is
now the repo for "ansible-core" and should frankly be relabeled in
github.
Have some problem
ansible --version
ERROR! Unexpected Exception, this is probably a bug: module ‘ansible.constants’ has no attribute ‘CONTROLLER_PYTHON_WARNING’
the full traceback was:
Traceback (most recent call last):
File “/usr/bin/ansible”, line 76, in
if C.CONTROLLER_PYTHON_WARNING and not _PY38_MIN:
AttributeError: module ‘ansible.constants’ has no attribute ‘CONTROLLER_PYTHON_WARNING’
Which tries to install the dependency ansible-core >= 2.12.0.
Unfortunately, ansible-core of that bleeding edge version really does
require python 3.8 or later now, and some operating systems don't have
one built in. In particular, the 'python3' on RHEL 7 and RHEL 8 is
only python 3.6, and the one on Amazon Linux 2 is only python 3.7.
This is a *BIG* problem for ansible servers, it's a problem for AWX,
and I'd be very curious indeed how the host Red Hat (which bought
ansible.com) is dealing with it for Ansible Tower.
I would run "python --version" and "python3 --version" to see if your
current python is recent enough. if not, you're not going to be able
to use the new "ansible-core" until you install a newer python by hook
or by crook for use by ansible-core and the "ansible" python tarball.
The mislabeling of the ansible-collections as a published python
module called "ansible" is its own issue that is confusing and
concealing the python-core python 3.8 issues.
May I also suggest being very careful with our prepositions? It “includes” nothing of the kind. It “requires” ansible-core 2.12, which is what actually requires python 3.8. As best I can tell, there is no component of the “ansible” tarball provided thorugh pypi.org which itself requires python 3.8, only the dependency on the very recent verson of ansible-core. And as best I can tell from my RPM building tests, tweaking ansible-5.0.0/ansible.egg-info/requires.txt and using ansible-core-2.11.6 works fine. I’d like to urge leaving the python 3.8 requirements in the “ansible-core”, and not trying to embed it in the “ansible” package. Unless I’m missing some hard-coded embedded dependency in the more than 100 third-party modules published inside the “ansible” tarball? I’m going to be exceptionally surprised if any or all of those actually require python 3.8 or ansible-core 2.12 yet.
It was brought to our attention that attempting to install Ansible 5
could fail due to the new ansible-core requirement on python >=3.8.
Ansible 5.0.1 raises the python requirement from >=2.7 to >=3.8 in
order to match ansible-core. The content of 5.0.1 is otherwise
identical to 5.0.0.
In addition, the Ansible 5.0.0 release has been removed (yanked) from
PyPI in order to allow pip to correctly fall back to Ansible 4.x and
ansible-core 2.11 if the python3.8 requirement is not met.
Once the requirement file has been downloaded, collections can be
installed by running "ansible-galaxy collection install -r
galaxy-requirements.yaml".
It turns out that yanking version 5.0.0 from PyPI was insufficient as
older versions of pip would not take it into account and insist on
trying to install 5.0.0.
5.0.0 has now been deleted from PyPI which should result in older
versions of pip choosing the appropriate version of the package based
on the version of python:
- for python>=3.8: ansible==5.0.1 (ansible-core 2.12)
- for python<3.8: ansible==4.9.0 (ansible-core 2.11)
It is only fair to apologize for the inconveniences surrounding the
release of 5.0.0 -- we plan on improving our test coverage in order to
prevent similar occurrences in the future.
On behalf of the Ansible community, thank you and happy automating !