diff --git a/tasks/nova_install.yml b/tasks/nova_install.yml index 74dfd1c6..f375f70d 100644 --- a/tasks/nova_install.yml +++ b/tasks/nova_install.yml @@ -71,11 +71,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: - nova_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: + - nova-install + - nova-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 nova_developer_mode | bool tags: - nova-install - nova-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 @@ -201,7 +208,7 @@ state: present virtualenv: "{{ nova_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 @@ -219,7 +226,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