Stop using platform-python

Since python2 is not supported long time - there's
no need to use /usr/libexec/platform-python.
Also for supporting Debian/Ubuntu - we need to
change that to /usr/bin/python3.

Change-Id: I0d477325e0edd13d1aba211c13dc2e8b7a9b4c98
This commit is contained in:
Michał Nasiadka 2020-12-14 15:11:01 +01:00 committed by Michal Nasiadka
parent d169b4f5c7
commit 4a0eebf704
5 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
- name: Ensure DNF repos are configured
hosts: seed-hypervisor:seed:overcloud
vars:
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
tags:
- dnf
tasks:

View File

@ -43,7 +43,7 @@
ansible_user: "{{ bootstrap_user }}"
# We can't assume that a virtualenv exists at this point, so use the system
# python interpreter.
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
roles:
- role: singleplatform-eng.users
users:
@ -70,7 +70,7 @@
vars:
# We can't assume that a virtualenv exists at this point, so use the system
# python interpreter.
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: Verify that a command can be executed
command: hostname

View File

@ -69,7 +69,7 @@
vars:
# Use the system python interpreter since the virtualenv might not
# exist.
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
when: virtualenv is defined
# If we gathered facts earlier it would have been with a different Python

View File

@ -15,7 +15,7 @@
hosts_in_kolla_inventory: >-
{{ kolla_overcloud_inventory_top_level_group_map.values() |
map(attribute='groups') | flatten | unique | union(['seed']) | join(':') }}
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
tasks:
- import_role:
name: pip

View File

@ -4,7 +4,7 @@
tags:
- pip
vars:
ansible_python_interpreter: /usr/libexec/platform-python
ansible_python_interpreter: /usr/bin/python3
roles:
- role: pip
gather_facts: false