From 5c55a64f55776430cc92d3a8b8313ae7b4337b29 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Tue, 20 Oct 2015 14:09:55 +0100 Subject: [PATCH] Set neutron_lib_dir depending on neutron_venv_enabled When neutron_venv_enabled is set to false, neutron fails to deploy as it cannot find the alembic_migrations dir. This is due to neutron being installed in dist-packages outside of the venv and site-packages inside the venv. This commit adjusts neutron_lib_dir depending on whether or not neutron_venv_enabled has been set. Change-Id: I9d992993b116e85216c07d6fdb6a4f99398a2102 Closes-Bug: #1508041 --- playbooks/roles/os_neutron/defaults/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/os_neutron/defaults/main.yml b/playbooks/roles/os_neutron/defaults/main.yml index a755b22f26..afb16cbf48 100644 --- a/playbooks/roles/os_neutron/defaults/main.yml +++ b/playbooks/roles/os_neutron/defaults/main.yml @@ -36,7 +36,9 @@ neutron_bin: "{{ neutron_venv_bin }}" # This is used for role access to the db migrations. # Example: # neutron_lib_dir: "/usr/local/lib/python2.7/dist-packages/neutron" -neutron_lib_dir: "{{ neutron_bin | dirname }}/lib/python2.7/site-packages/neutron" +neutron_venv_lib_dir: "{{ neutron_bin | dirname }}/lib/python2.7/site-packages/neutron" +neutron_non_venv_lib_dir: "/usr/local/lib/python2.7/dist-packages/neutron" +neutron_lib_dir: "{{ (neutron_venv_enabled | bool) | ternary(neutron_venv_lib_dir, neutron_non_venv_lib_dir) }}" neutron_fatal_deprecations: False