From 1eb3ac2ba237fee3efecabf6da401ec9811cdd1f Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 23 Mar 2018 12:51:43 +0000 Subject: [PATCH] Add missing 'when' for conditionals --- tasks/python_venv_install.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/python_venv_install.yml b/tasks/python_venv_install.yml index c93be65..a9336bb 100644 --- a/tasks/python_venv_install.yml +++ b/tasks/python_venv_install.yml @@ -18,12 +18,14 @@ src: "{{ venv_reuse_download_path }}/{{ venv_destination_path | basename }}.checksum" dest: "{{ venv_destination_path | dirname }}" register: _venv_checksum_copy + when: - _src_venv_present.stat.exists | bool - name: Remove existing venv on target host if it is changing file: path: "{{ venv_destination_path }}" state: absent + when: - _venv_checksum_copy is mapping - _venv_checksum_copy | changed @@ -37,6 +39,7 @@ src: "{{ venv_reuse_download_path }}/{{ venv_destination_path | basename }}.tgz" dest: "{{ venv_destination_path }}" remote_src: no + when: - _venv_checksum_copy is mapping - _venv_checksum_copy | changed notify: