From 20f8ad42ce3a7cf9cc9139c48bd11872af2fb10c Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 1 Mar 2021 15:23:27 +0200 Subject: [PATCH] Slurp constraints for all hosts This fixes bug when content slurp has been performed only for single host. Others were having invalid contstraints file with single record in it. Change-Id: I7189e061f6c8ab3dfb69dda6a9e7f974f8bdc06b --- tasks/python_venv_install.yml | 9 +++++++++ tasks/python_venv_wheel_build.yml | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tasks/python_venv_install.yml b/tasks/python_venv_install.yml index 3439e0a..292a142 100644 --- a/tasks/python_venv_install.yml +++ b/tasks/python_venv_install.yml @@ -13,6 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Slurp up the constraints file for later re-deployment + delegate_to: "{{ venv_build_host }}" + become: "{{ venv_build_host == 'localhost' }}" + slurp: + src: "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-constraints.txt" + register: _constraints_file_slurp + run_once: true + when: venv_wheel_build_enable | bool + # TODO(odyssey4me): # Set a fact for the selective inclusion of the build package list. # Perhaps do this if the distro/architecture of the target host differs diff --git a/tasks/python_venv_wheel_build.yml b/tasks/python_venv_wheel_build.yml index 5c7c8a5..1a09cc8 100644 --- a/tasks/python_venv_wheel_build.yml +++ b/tasks/python_venv_wheel_build.yml @@ -157,10 +157,3 @@ {{ file_name.split('-')[0] | lower }}=={{ (file_name.split('-')[1].split('_')) | join('.post') | lower }} {% endfor %} dest: "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-constraints.txt" - - - name: Slurp up the constraints file for later re-deployment - slurp: - src: "{{ venv_build_host_requirements_path }}/{{ venv_install_destination_path | basename }}-constraints.txt" - register: _constraints_file_slurp - tags: - - install