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 - name: Ensure DNF repos are configured
hosts: seed-hypervisor:seed:overcloud hosts: seed-hypervisor:seed:overcloud
vars: vars:
ansible_python_interpreter: /usr/libexec/platform-python ansible_python_interpreter: /usr/bin/python3
tags: tags:
- dnf - dnf
tasks: tasks:

View File

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

View File

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

View File

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

View File

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