From 5e6440cb0bda9c8ff8de28c61f8c53f08a4d627b Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Fri, 26 May 2017 11:01:30 +0100 Subject: [PATCH] Allow the developer constraints to be adjusted In order to do a developer mode that allows installation of packages from local file, which take precedence over the developer_mode constraints, we need to allow the order of the constraints to be changed. This patch adds a "pip_install_developer_constraints" var which is used to set the developer mode constraints. By default this will leave the same behaviour but will allow additional constraints to be added, or the developermode constraints file to be overriden altogether. Change-Id: Iad94ffc7c3dd96a585b94d58ed8997f13d765f0d --- tasks/glance_install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/glance_install.yml b/tasks/glance_install.yml index 0aa477aa..a118634c 100644 --- a/tasks/glance_install.yml +++ b/tasks/glance_install.yml @@ -39,6 +39,7 @@ name: "{{ glance_requires_pip_packages }}" state: "{{ glance_pip_package_state }}" extra_args: >- + {{ glance_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages @@ -90,7 +91,7 @@ virtualenv: "{{ glance_bin | dirname }}" virtualenv_site_packages: "no" extra_args: >- - {{ glance_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }} + {{ glance_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages