From 8c72de83a728a14111b76a8582fdc5723946d689 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Fri, 26 May 2017 10:44:03 +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: I643d1fd7f9bb3b7731dd56a9a9c4ac3c1f8049d6 --- tasks/aodh_install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/aodh_install.yml b/tasks/aodh_install.yml index 066da65..710834b 100644 --- a/tasks/aodh_install.yml +++ b/tasks/aodh_install.yml @@ -52,6 +52,7 @@ name: "{{ aodh_requires_pip_packages }}" state: "{{ aodh_pip_package_state }}" extra_args: >- + {{ aodh_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 @@ -103,7 +104,7 @@ virtualenv: "{{ aodh_bin | dirname }}" virtualenv_site_packages: "no" extra_args: >- - {{ aodh_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }} + {{ aodh_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