diff --git a/tasks/repo_build_venvs.yml b/tasks/repo_build_venvs.yml index b4c9ce1..a4ffe08 100644 --- a/tasks/repo_build_venvs.yml +++ b/tasks/repo_build_venvs.yml @@ -34,6 +34,7 @@ src: "venv-build-script.sh.j2" dest: "/opt/venv-build-script.sh" mode: "0755" + register: _create_venv_build_script - name: Create venv build options files template: @@ -48,6 +49,7 @@ executable: "/bin/bash" when: - (item | changed) or + (_create_venv_build_script | changed) or (ansible_local['openstack_ansible']['repo_build']['need_venv_build'] | bool) with_items: - "{{ _create_venv_options_files.results }}" diff --git a/templates/venv-build-script.sh.j2 b/templates/venv-build-script.sh.j2 index 3179646..39272f0 100644 --- a/templates/venv-build-script.sh.j2 +++ b/templates/venv-build-script.sh.j2 @@ -85,7 +85,9 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null ${ROLE_VENV_PATH}/bin/python {{ repo_build_release_path }}/get-pip.py \ pip setuptools wheel \ --find-links {{ repo_build_release_path }} \ - ${PIP_INSTALL_OPTIONS} &>${ROLE_VENV_LOG} + ${PIP_INSTALL_OPTIONS} \ + --constraint {{ repo_build_release_path }}/requirements_constraints.txt \ + &>${ROLE_VENV_LOG} # Install the packages into the venv ${ROLE_VENV_PATH}/bin/pip install \