Good Day,
We are running audit scripts on all of our servers. The results are in a .tar.gz file on each server with the servername-date-time included. I am running the following to pull the files from the servers but without success :
`
- hosts: one
become: yes
become_method: sudo
tasks: - name: Find Audit Results
find:
paths: /root/
patterns: “{{ inventory_hostname }}*.tar.gz”
use_regex: True
recurse: no
register: results - name: Copy Audit Results From Servers
fetch:
src: “{{ path.item }}”
dest: /home/shaun/Audit
fail_on_missing: yes
flat: yes
with_items: “{{ results.files }}”
`
It executes without error but does not retrieve the files. Can anyone assist ?
Regards
Shaun