diff --git a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 index 055d903bef..ec111eedcb 100644 --- a/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 +++ b/ansible/roles/aodh/templates/wsgi-aodh.conf.j2 @@ -1,7 +1,7 @@ {% if aodh_install_type == 'binary' %} - {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %} + {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %} {% else %} - {% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} + {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} {% endif %} {% set binary_path = '/usr/bin' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} Listen {{ api_interface_address }}:{{ aodh_api_listen_port }} @@ -27,7 +27,7 @@ TraceEnable off WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }} WSGIProcessGroup aodh -{% if aodh_install_type == 'binary' and kolla_base_distro == 'ubuntu' %} +{% if aodh_install_type == 'binary' and kolla_base_distro in ['debian', 'ubuntu'] %} WSGIScriptAlias / "{{ binary_path }}/python3-aodh-api" {% else %} WSGIScriptAlias / "{{ binary_path }}/aodh-api" diff --git a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 index 7a43a55ae6..9230ee7187 100644 --- a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 +++ b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 @@ -1,7 +1,7 @@ {% if cinder_install_type == 'binary' %} - {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %} + {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %} {% else %} - {% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} + {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} {% endif %} Listen {{ api_interface_address }}:{{ cinder_api_listen_port }} diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 index e65b4f1191..1392aa1515 100644 --- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 +++ b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 @@ -1,7 +1,7 @@ {% if gnocchi_install_type == 'binary' %} - {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %} + {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %} {% else %} - {% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} + {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} {% endif %} {% set wsgi_path = '/usr/bin' if gnocchi_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} Listen {{ api_interface_address }}:{{ gnocchi_api_listen_port }} @@ -18,7 +18,7 @@ TraceEnable off WSGIApplicationGroup %{GLOBAL} WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }} WSGIProcessGroup gnocchi -{% if gnocchi_install_type == 'binary' and kolla_base_distro == 'ubuntu' %} +{% if gnocchi_install_type == 'binary' and kolla_base_distro in ['debian', 'ubuntu'] %} WSGIScriptAlias / "{{ wsgi_path }}/python3-gnocchi-api" {% else %} WSGIScriptAlias / "{{ wsgi_path }}/gnocchi-api" diff --git a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 index 3c3816ceeb..1dc914a5d2 100644 --- a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 +++ b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 @@ -1,8 +1,8 @@ {% set keystone_log_dir = '/var/log/kolla/keystone' %} {% if keystone_install_type == 'binary' %} -{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %} +{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %} {% else %} -{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} +{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} {% endif %} {% set binary_path = '/usr/bin' if keystone_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} Listen {{ api_interface_address }}:{{ keystone_public_listen_port }} diff --git a/ansible/roles/placement/templates/placement-api-wsgi.conf.j2 b/ansible/roles/placement/templates/placement-api-wsgi.conf.j2 index 5373d95a08..5199eb2999 100644 --- a/ansible/roles/placement/templates/placement-api-wsgi.conf.j2 +++ b/ansible/roles/placement/templates/placement-api-wsgi.conf.j2 @@ -1,8 +1,8 @@ {% set log_dir = '/var/log/kolla/placement' %} {% if placement_install_type == 'binary' %} - {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %} + {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %} {% else %} - {% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %} + {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} {% endif %} {% set wsgi_directory = '/usr/bin' if placement_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}