db87a0845f
The "python-path" configuration option makes its way through to Zuul where it sets the "ansible_interpreter_path" in the inventory. Currently this defaults to "/usr/bin/python2" which is wrong for Python 3-only distributions. Ansible >=2.8 provides for automated discovery of the interpreter to avoid runtime errors choosing an invalid interpreter [1]. Using this should mean that "python-path" doesn't need to be explicitly for any common case. As more distributions become Python 3 only, this should "do the right thing" without further configuration. This switches the default python-path to "auto". The dependent change updates Zuul to accept this and use it when running with Ansible >=2.8, or default back to "/usr/bin/python2" for earlier Ansible versions. Testing and documentation is updated, and a release note added. [1] https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html Depends-On: https://review.opendev.org/682275 Change-Id: I02a1a618c8806b150049e91b644ec3c0cb826ba4
24 lines
1.0 KiB
YAML
24 lines
1.0 KiB
YAML
---
|
|
features:
|
|
- |
|
|
The default ``python-path`` is now ``auto`` (instead of
|
|
``/usr/bin/python2``). With this, Zuul 3.11.1 and greater will set the
|
|
``ansible_python_interpreter`` to ``auto`` when using Ansible
|
|
>=2.8 to use `automated interpreter discovery
|
|
<https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html>`__.
|
|
When using earlier Ansible, it will remain the old default of
|
|
``/usr/bin/python2``.
|
|
|
|
This will remove the need to override python-path explicitly for
|
|
Python 3-only distributions, which should be detected correctly
|
|
automatically.
|
|
|
|
upgrade:
|
|
- |
|
|
This release should only be run against Zuul 3.11.1 or greater.
|
|
Earlier Zuul releases will not convert the new default
|
|
``python-path`` of ``auto`` to ``/usr/bin/python2`` for Ansible
|
|
<2.8, leading to a configuration error. It may be possible to use
|
|
earlier Zuul releases if you you are only using Ansible >= 2.8, or
|
|
explicitly set ``python-path`` for every image.
|