Ansible 5.0.0 has been released

449 views
Skip to first unread message

David Moreau Simard

unread,
Nov 30, 2021, 11:39:54 AM11/30/21
to ansible-...@googlegroups.com, ansibl...@googlegroups.com, ansible...@googlegroups.com
Hi all,

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.

How to get it
-------------

Due to a limitation in pip, if you are upgrading from Ansible 3 (or
earlier), you need to uninstall ansible and ansible-base before
installing Ansible 5:

```
$ pip uninstall ansible ansible-base
$ pip install ansible==5.0.0 --user
```

The tar.gz of the release can be found here:

Ansible 5.0.0: https://pypi.python.org/packages/source/a/ansible/ansible-5.0.0.tar.gz
SHA256: 006504b4ba5f355073e0b3f10f317a5684c0ce7a35798b18fa18fbffaedab2a6

What's new in Ansible 5.0.0
---------------------------

* The changelog for ansible-core 2.12.0 installed by this release of
ansible is available here:
https://github.com/ansible/ansible/blob/stable-2.12/changelogs/CHANGELOG-v2.12.rst

* Collections which have opted into being a part of the Ansible-5
unified changelog will have an entry on this page:
https://github.com/ansible-community/ansible-build-data/blob/main/5/CHANGELOG-v5.rst

* ansible-core-2.12 now requires Python 3.8 or greater on the
controller (where you run ansible-playbook).

* Support for python 2.6 for managed nodes is deprecated in
ansible-core 2.12 and will be removed in ansible-core 2.13 (around May
2022)

* For collections which have not opted into the unified changelog, you
may find more information on https://galaxy.ansible.com or their
source repository. For example, the community.crypto collection would
be found at https://galaxy.ansible.com/community/crypto and you can
find a link to the source repository under the "Repo" button at the
top right.

What's the schedule for new Ansible releases after 5.0.0 ?
---------------------------------------------------------

* Maintenance releases of Ansible 5.x will occur approximately every
three weeks (Ansible 5.1.0, Ansible 5.2.0, etc) until the release of
Ansible 6.0.0. They will contain bugfixes and new features but no
backwards incompatibilities.

* Except for ansible-2.9.x, older versions of ansible are no longer
seeing maintenance releases. If there is a desire for maintenance
releases of older versions, drop by a Community Working Group Meeting
to discuss how you can help:
https://github.com/ansible/community/tree/main/meetings#wednesdays

* The last expected release of Ansible 4.x will be 4.10 around
December 14th 2021.

Porting Help
-------------

A unified porting guide for collections which have opted-in is available here:
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_5.html

On behalf of the Ansible community, thank you and happy automating !

Nico Kadel-Garcia

unread,
Nov 30, 2021, 3:48:41 PM11/30/21
to ansible...@googlegroups.com, ansible-...@googlegroups.com, ansibl...@googlegroups.com
On Tue, Nov 30, 2021 at 11:39 AM David Moreau Simard
<dmsi...@redhat.com> wrote:
>
> Hi all,
>
> 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.

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.

Bond James

unread,
Dec 1, 2021, 3:11:15 AM12/1/21
to Ansible Project
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 <module>
    if C.CONTROLLER_PYTHON_WARNING and not _PY38_MIN:
AttributeError: module 'ansible.constants' has no attribute 'CONTROLLER_PYTHON_WARNING'

After

$ pip uninstall ansible ansible-base
$ pip install ansible==5.0.0 --user

вторник, 30 ноября 2021 г. в 21:48:41 UTC+1, nka...@gmail.com:

dulh...@mailbox.org

unread,
Dec 1, 2021, 3:21:17 AM12/1/21
to ansible...@googlegroups.com
just a wild guess ... could this mean the python3 package available on your ansible controller is not recent enough for ansible 5.0 ?

--
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/67cb32c5-17c2-48b2-a93c-4341a765df24n%40googlegroups.com.

Nico Kadel-Garcia

unread,
Dec 1, 2021, 6:46:31 AM12/1/21
to ansible...@googlegroups.com
On Wed, Dec 1, 2021 at 3:11 AM Bond James <kyr...@gmail.com> wrote:
>
> 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 <module>
> if C.CONTROLLER_PYTHON_WARNING and not _PY38_MIN:
> AttributeError: module 'ansible.constants' has no attribute 'CONTROLLER_PYTHON_WARNING'


>
> After
> $ pip uninstall ansible ansible-base
> $ pip install ansible==5.0.0 --user

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.

Nico Kadel-Garcia

unread,
Dec 1, 2021, 7:12:34 AM12/1/21
to Ansible Project
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.

David Moreau Simard

unread,
Dec 2, 2021, 1:10:42 PM12/2/21
to ansible-...@googlegroups.com, ansibl...@googlegroups.com, ansible...@googlegroups.com
Hi all,

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.

If you would like to use the updated set of collections that are
included with Ansible 5 while using ansible-core 2.11, a
galaxy-requirements.yaml file has been made available:
https://github.com/ansible-community/ansible-build-data/blob/main/5/galaxy-requirements.yaml

Once the requirement file has been downloaded, collections can be
installed by running "ansible-galaxy collection install -r
galaxy-requirements.yaml".

Getting Ansible 5.0.1
--------------------

Due to a limitation in pip, if you are upgrading from Ansible 3 (or
earlier), you need to uninstall ansible and ansible-base before
installing Ansible 5:
```
$ pip uninstall ansible ansible-base
$ pip install ansible==5.0.0 --user
```

The tar.gz of the release can be found here:
Ansible 5.0.1: https://pypi.python.org/packages/source/a/ansible/ansible-5.0.1.tar.gz
SHA256: b47cc704bbb69fb387bdaa24a1cb0c5ef0a4253763fd3315ef93ba6ae3a5c376

On behalf of the Ansible community, thank you and happy automating !

On Tue, Nov 30, 2021 at 11:39 AM David Moreau Simard
<dmsi...@redhat.com> wrote:
>

David Moreau Simard

unread,
Dec 6, 2021, 12:34:05 PM12/6/21
to ansible-...@googlegroups.com, ansibl...@googlegroups.com, ansible...@googlegroups.com
Hello once again,

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)

Users may, at their discretion, continue using ansible-core 2.11 along
with the latest versions of Ansible collections that ship in Ansible 5
by using an ansible-galaxy requirements file that we have made
available:
https://github.com/ansible-community/ansible-build-data/blob/main/5/galaxy-requirements.yaml

Other potential alternatives have been suggested by Jeff Geerling and
you can read more about them on his blog (thanks geerlingguy!):
https://www.jeffgeerling.com/blog/2021/install-python-39-on-raspberry-pi-os-or-debian-10-ansible-or-other-uses

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 !

Reply all
Reply to author
Forward
0 new messages