- name: find it
find:
path: /tmp/
patterns: '*_oscap_results.html,*_oscap_arf.xml'
register: oscap_results
- name: copy it
fetch:
src: "{{ item.path }}"
dest: /mnt/SCAP/
*_oscap_results.html /mnt/SCAP/{{ansible_hostname}}/tmp/". So make sure that /mnt/SCAP/ is mounted on the node you are running ansible from and that you have the permission to create files and directories there. You might also look at the "copy" module with "remote_src: True" if the network share is mounted on the remote node.