updated logic
diff --git a/tasks/download_files.yml b/tasks/download_files.yml index 81ba1d7..f5b1361 100644 --- a/tasks/download_files.yml +++ b/tasks/download_files.yml
@@ -8,9 +8,9 @@ debug: var: download_set -#- name: Download files -# fetch: -# src: "{{ item.path }}" -# dest: "{{ download_folder }}" -# with_items: "{{ download_set.files }}" -# when: download_set.files | length > 0 +- name: Download files + fetch: + src: "{{ item.path }}" + dest: "{{ download_folder }}" + with_items: "{{ download_set.files }}" + when: download_set.files | length > 0
diff --git a/tasks/main.yml b/tasks/main.yml index b974da7..fe4ef20 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -24,7 +24,7 @@ with_items: "{{ downloads.results }}" - name: Iterate over files found - include_tasks: download_files.yml + include: download_files.yml with_items: downloads.results loop_control: loop_var: download_set \ No newline at end of file