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