Merge "Set apt use to python3."
This commit is contained in:
commit
f793938667
@ -49,9 +49,9 @@
|
|||||||
- name: "Update apt cache if Ubuntu/Debian"
|
- name: "Update apt cache if Ubuntu/Debian"
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: '/usr/bin/python'
|
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: '/usr/bin/python3'
|
||||||
|
|
||||||
- name: "Load distribution defaults"
|
- name: "Load distribution defaults"
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
@ -86,7 +86,7 @@
|
|||||||
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
|
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
|
||||||
with_items: "{{ required_packages }}"
|
with_items: "{{ required_packages }}"
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: '/usr/bin/python'
|
ansible_python_interpreter: '/usr/bin/python3'
|
||||||
|
|
||||||
- include: prepare_libvirt.yml
|
- include: prepare_libvirt.yml
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
enable_venv: true
|
enable_venv: true
|
||||||
when: lookup('env', 'VENV') | length > 0
|
when: lookup('env', 'VENV') | length > 0
|
||||||
|
|
||||||
- name: "Retrieve venv python path"
|
- name: "Retrieve venv python3 path"
|
||||||
shell: "/bin/echo -e \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python').split('/')[-1] }}"
|
shell: "/bin/echo -e \"import sys\\nprint(':'.join(sys.path))\" | {{ ansible_python.get('executable', '/usr/bin/python3').split('/')[-1] }}"
|
||||||
environment: "{{ bifrost_venv_env | default({}) }}"
|
environment: "{{ bifrost_venv_env | default({}) }}"
|
||||||
register: venv_pythonpath_result
|
register: venv_pythonpath_result
|
||||||
when: enable_venv
|
when: enable_venv
|
||||||
|
@ -92,11 +92,11 @@ if [ ${USE_VENV} = "true" ]; then
|
|||||||
set -u
|
set -u
|
||||||
ANSIBLE=${VENV}/bin/ansible-playbook
|
ANSIBLE=${VENV}/bin/ansible-playbook
|
||||||
ENABLE_VENV="true"
|
ENABLE_VENV="true"
|
||||||
ANSIBLE_PYTHON_INTERP=${VENV}/bin/python
|
ANSIBLE_PYTHON_INTERP=${VENV}/bin/python3
|
||||||
else
|
else
|
||||||
$SCRIPT_HOME/env-setup.sh
|
$SCRIPT_HOME/env-setup.sh
|
||||||
ANSIBLE=${HOME}/.local/bin/ansible-playbook
|
ANSIBLE=${HOME}/.local/bin/ansible-playbook
|
||||||
ANSIBLE_PYTHON_INTERP=$(which python)
|
ANSIBLE_PYTHON_INTERP=$(which python3)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adjust options for DHCP, VM, or Keystone tests
|
# Adjust options for DHCP, VM, or Keystone tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user