Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: all
- tasks:
- - name: find_logs
- shell: (cd /u01/filestorage/adapters/rrm-filestorage-app/log/; find . -mmin -1200 -type f) | cut -d'/' -f2
- register: files_to_copy
- - name: fetch_logs
- fetch:
- src: /u01/filestorage/adapters/rrm-filestorage-app/log/{{ item }}
- dest: /mnt/c/distr/ansible/fetch_logs/log2/{{ inventory_hostname }}/
- flat: yes
- with_items: "{{ files_to_copy.stdout_lines }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement