Copy file(s) locally in Ansible machine

Hi,

My playbook selects a bunch of files from various places on the Ansible host, puts them together in a directory, processes them then sends that processed directory to remote servers, something like this:

  • copy source dir 1 to proc_dir directory on Ansible master

  • coipy source dir 2 to proc_dir directory on Ansible master

  • process files in proc_dir on Ansible master

  • win_copy src=proc_dir, dest=remote_dir

Are there any facilities for such local processing? It strikes me that it’s an efficient way to work, but is it an accepted Ansible pattern, and is there support for it?

Cheers,

Nick

Either use hosts: localhost or delegatge_to: localhost