blob: c248f8d0c36069c9d640f84a690e052777b0d486 [file] [log] [blame]
---
# tasks file for fetch-found-files
- name: Validate that we have download_pattern
fail:
msg: "Please provide a download_pattern list that follows dir: 'directory name', pattern: 'file pattern'"
when: download_pattern is not defined
- name: Create download folder
become: no
local_action: file path={{ download_folder }} state=directory
- name: Find download log files
find:
path: '{{ item.dir }}'
pattern: '{{ item.pattern }}'
file_type: file
recurse: yes
with_items: "{{ download_pattern }}"
register: downloads
- name: Examine downloads.results collection assembled
debug:
msg: "Showing files result: {{ item.files }}"
with_items: "{{ downloads.results }}"
- name: Iterate over files found
include: download_files.yml
with_items: "{{ downloads.results }}"
loop_control:
label: "{{ file_result }}"
loop_var: file_result