Map Debian 8 to Python 2 (#74152)
* Map Debian 8 to Python 2 If Python 3 is installed on Debian 8 Ansible cannot run, as the version is too old (3.4) * Add integration test for python interpreter discovery on Debian 8 * fix test issue on Debian 9, add changelog * un"fix" not broken test :D Co-authored-by: Fabian Klemp <fabian.klemp@elara-gmbh.de> Co-authored-by: Matt Davis <mrd@redhat.com>
This commit is contained in:
parent
e6af2d6827
commit
437a08eb6d
3 changed files with 8 additions and 2 deletions
2
changelogs/fragments/debian8_discovery.yml
Normal file
2
changelogs/fragments/debian8_discovery.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- interpreter discovery - Debian 8 and lower will avoid unsupported Python3 version in interpreter discovery
|
|
@ -1482,6 +1482,7 @@ INTERPRETER_PYTHON_DISTRO_MAP:
|
||||||
'6': /usr/bin/python
|
'6': /usr/bin/python
|
||||||
'8': /usr/libexec/platform-python
|
'8': /usr/libexec/platform-python
|
||||||
debian:
|
debian:
|
||||||
|
'8': /usr/bin/python
|
||||||
'10': /usr/bin/python3
|
'10': /usr/bin/python3
|
||||||
fedora:
|
fedora:
|
||||||
'23': /usr/bin/python3
|
'23': /usr/bin/python3
|
||||||
|
|
|
@ -140,8 +140,11 @@
|
||||||
- name: debian assertions
|
- name: debian assertions
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- auto_out.ansible_facts.discovered_interpreter_python == '/usr/bin/python3'
|
# Debian 8 and older
|
||||||
when: distro == 'debian' and distro_version is version('10', '>=')
|
- auto_out.ansible_facts.discovered_interpreter_python == '/usr/bin/python' and distro_version is version('8', '<=') or distro_version is version('8', '>')
|
||||||
|
# Debian 10 and newer
|
||||||
|
- auto_out.ansible_facts.discovered_interpreter_python == '/usr/bin/python3' and distro_version is version('10', '>=') or distro_version is version('10', '<')
|
||||||
|
when: distro == 'debian'
|
||||||
|
|
||||||
- name: fedora assertions
|
- name: fedora assertions
|
||||||
assert:
|
assert:
|
||||||
|
|
Loading…
Reference in a new issue