diff --git a/tasks/glance_install.yml b/tasks/glance_install.yml index fb085e7e..01ef1e0d 100644 --- a/tasks/glance_install.yml +++ b/tasks/glance_install.yml @@ -58,11 +58,18 @@ - name: Add constraints to pip_install_options fact for developer mode set_fact: - pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt" + pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt" when: - glance_developer_mode | bool - - "'/opt/developer-pip-constraints.txt' not in pip_install_options|default('')" - - "'/opt/requirements/upper-constraints.txt' not in pip_install_options|default('')" + tags: + - glance-install + - glance-pip-packages + +- name: Set pip_install_options_fact when not in developer mode + set_fact: + pip_install_options_fact: "{{ pip_install_options|default('') }}" + when: + - not glance_developer_mode | bool tags: - glance-install - glance-pip-packages @@ -84,7 +91,7 @@ pip: name: "{{ item }}" state: present - extra_args: "{{ pip_install_options|default('') }}" + extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success retries: 5 @@ -202,7 +209,7 @@ state: present virtualenv: "{{ glance_venv_bin | dirname }}" virtualenv_site_packages: "no" - extra_args: "{{ pip_install_options|default('') }}" + extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success retries: 5 @@ -221,7 +228,7 @@ pip: name: "{{ item }}" state: present - extra_args: "{{ pip_install_options|default('') }}" + extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success retries: 5