# Ansible 5.0.0 has been released

**URL:** <https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053>\
**Category:** Ansible Project\
**Created:** [November 30, 2021, 4:39pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053 "2021-11-30T16:39:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Moreau\_Simard2](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@David\_Moreau\_Simard2](https://forum.ansible.com/u/David_Moreau_Simard2)\
**Post date:** [November 30, 2021, 4:39pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/1 "2021-11-30T16:39:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [November 30, 2021, 8:48pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/2 "2021-11-30T20:48:19Z")

</div>

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/](https://github.com/ansible/ansible/), which is  
now the repo for "ansible-core" and should frankly be relabeled in  
github.

---

<div class="post-metadata">

**Author:** ![Bond\_James](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Bond\_James](https://forum.ansible.com/u/Bond_James)\
**Post date:** [December 1, 2021, 8:11am UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/3 "2021-12-01T08:11:15Z")

</div>

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’

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

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

---

<div class="post-metadata">

**Author:** ![dulhaver](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulhaver/32/1061_2.png) [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Post date:** [December 1, 2021, 8:20am UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/4 "2021-12-01T08:20:59Z")

</div>

just a wild guess … could this mean the **python3** package available on your ansible controller is **not recent enough** for ansible 5.0 ?

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [December 1, 2021, 11:46am UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/5 "2021-12-01T11:46:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [December 1, 2021, 12:12pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/6 "2021-12-01T12:12:34Z")

</div>

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](http://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.

---

<div class="post-metadata">

**Author:** ![David\_Moreau\_Simard2](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@David\_Moreau\_Simard2](https://forum.ansible.com/u/David_Moreau_Simard2)\
**Post date:** [December 2, 2021, 6:09pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/7 "2021-12-02T18:09:57Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![David\_Moreau\_Simard2](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@David\_Moreau\_Simard2](https://forum.ansible.com/u/David_Moreau_Simard2)\
**Post date:** [December 6, 2021, 5:33pm UTC](https://forum.ansible.com/t/ansible-5-0-0-has-been-released/36053/8 "2021-12-06T17:33:29Z")

</div>

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](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](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 !
