diff --git a/inventory/group_vars/all/all.yml b/inventory/group_vars/all/all.yml index b10b203fdf..fe1a2b0c23 100644 --- a/inventory/group_vars/all/all.yml +++ b/inventory/group_vars/all/all.yml @@ -19,6 +19,12 @@ openstack_release: "{{ lookup('env', 'OSA_VERSION') | default('undefined', true) ## OpenStack Configuration directory openstack_config_dir: "{{ lookup('env', 'OSA_CONFIG_DIR') | default('/etc/openstack_deploy') }}" +## OpenStack service python version +openstack_venv_python_executable: "{{ (ansible_distribution == 'CentOS') | ternary('python2', 'python3') }}" + +#uwsgi venv deploys the same python version as OpenStack service venv +uwsgi_python_executable: "{{ openstack_venv_python_executable }}" + ## Verbosity Options debug: False diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index 1400eeb4c7..9c1197e9d1 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -120,6 +120,7 @@ include_role: name: "python_venv_build" vars: + venv_python_executable: "{{ utility_venv_python_executable | default(openstack_venv_python_executable) }}" venv_install_destination_path: "{{ utility_venv_bin | dirname }}" venv_pip_install_args: "{{ pip_install_options | default('') }}" venv_build_constraints: