blob: 23c88c305f7f6a991738fa2f4b572cc74855f48d [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 result: {{ item }}"
with_items: downloads.results
#
#- name: Iterate over patterns found
# include: download_files.yml
# var:
# result: "{{ item }}"
# with_items: downloads.results