Merge "Set apt use to python3."

This commit is contained in:
Zuul 2020-01-08 16:03:47 +00:00 committed by Gerrit Code Review
commit f793938667
3 changed files with 7 additions and 7 deletions

View File

@ -49,9 +49,9 @@
- name: "Update apt cache if Ubuntu/Debian"
apt:
update_cache: yes
vars:
ansible_python_interpreter: '/usr/bin/python'
when: ansible_os_family == "Debian"
vars:
ansible_python_interpreter: '/usr/bin/python3'
- name: "Load distribution defaults"
include_vars: "{{ item }}"
@ -86,7 +86,7 @@
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: "{{ required_packages }}"
vars:
ansible_python_interpreter: '/usr/bin/python'
ansible_python_interpreter: '/usr/bin/python3'
- include: prepare_libvirt.yml

View File

@ -16,8 +16,8 @@
enable_venv: true
when: lookup('env', 'VENV') | length > 0
- name: "Retrieve venv python path"
shell: "/bin/echo -e \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python').split('/')[-1] }}"
- name: "Retrieve venv python3 path"
shell: "/bin/echo -e \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python3').split('/')[-1] }}"
environment: "{{ bifrost_venv_env | default({}) }}"
register: venv_pythonpath_result
when: enable_venv

View File

@ -92,11 +92,11 @@ if [ ${USE_VENV} = "true" ]; then
set -u
ANSIBLE=${VENV}/bin/ansible-playbook
ENABLE_VENV="true"
ANSIBLE_PYTHON_INTERP=${VENV}/bin/python
ANSIBLE_PYTHON_INTERP=${VENV}/bin/python3
else
$SCRIPT_HOME/env-setup.sh
ANSIBLE=${HOME}/.local/bin/ansible-playbook
ANSIBLE_PYTHON_INTERP=$(which python)
ANSIBLE_PYTHON_INTERP=$(which python3)
fi
# Adjust options for DHCP, VM, or Keystone tests