diff --git a/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml index b6869cbc7..e37d716a7 100644 --- a/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml @@ -16,6 +16,7 @@ - name: "If VENV is set in the environment, enable installation into venv" set_fact: enable_venv: true + uwsgi_venv: "{{ bifrost_venv_env.get('VIRTUAL_ENV', '') }}" when: lookup('env', 'VENV') | length > 0 - name: "Get uwsgi install location" diff --git a/playbooks/roles/bifrost-keystone-install/templates/keystone-admin.ini.j2 b/playbooks/roles/bifrost-keystone-install/templates/keystone-admin.ini.j2 index 3e0b3156e..7aa377fa8 100644 --- a/playbooks/roles/bifrost-keystone-install/templates/keystone-admin.ini.j2 +++ b/playbooks/roles/bifrost-keystone-install/templates/keystone-admin.ini.j2 @@ -6,6 +6,9 @@ threads = 2 plugin = python no-orphans = true chmod-socket = 660 +{% if uwsgi_venv is defined and uwsgi_venv | length > 0 %} +virtualenv = {{ uwsgi_venv }} +{% endif %} socket = /run/uwsgi/keystone-admin.socket pidfile = /run/uwsgi/keystone-admin.pid diff --git a/playbooks/roles/bifrost-keystone-install/templates/keystone-public.ini.j2 b/playbooks/roles/bifrost-keystone-install/templates/keystone-public.ini.j2 index 8641ae18c..58e00e526 100644 --- a/playbooks/roles/bifrost-keystone-install/templates/keystone-public.ini.j2 +++ b/playbooks/roles/bifrost-keystone-install/templates/keystone-public.ini.j2 @@ -6,6 +6,9 @@ threads = 2 plugin = python no-orphans = true chmod-socket = 660 +{% if uwsgi_venv is defined and uwsgi_venv | length > 0 %} +virtualenv = {{ uwsgi_venv }} +{% endif %} socket = /run/uwsgi/keystone-public.socket pidfile = /run/uwsgi/keystone-public.pid