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
This commit is contained in:
Matt Thompson 2015-10-20 14:09:55 +01:00
parent 0773984c28
commit 725a535335

View File

@ -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