Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. ---
  2.  
  3. - hosts: all
  4.  
  5. tasks:
  6. - name: find_logs
  7. shell: (cd /u01/filestorage/adapters/rrm-filestorage-app/log/; find . -mmin -1200 -type f) | cut -d'/' -f2
  8. register: files_to_copy
  9. - name: fetch_logs
  10. fetch:
  11. src: /u01/filestorage/adapters/rrm-filestorage-app/log/{{ item }}
  12. dest: /mnt/c/distr/ansible/fetch_logs/log2/{{ inventory_hostname }}/
  13. flat: yes
  14. with_items: "{{ files_to_copy.stdout_lines }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement