# Copy file(s) locally in Ansible machine

**URL:** <https://forum.ansible.com/t/copy-file-s-locally-in-ansible-machine/25470>\
**Category:** Ansible Project\
**Created:** [September 12, 2017, 10:58pm UTC](https://forum.ansible.com/t/copy-file-s-locally-in-ansible-machine/25470 "2017-09-12T22:58:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Mellor](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@Nick\_Mellor](https://forum.ansible.com/u/Nick_Mellor)\
**Post date:** [September 12, 2017, 10:58pm UTC](https://forum.ansible.com/t/copy-file-s-locally-in-ansible-machine/25470/1 "2017-09-12T22:58:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [September 13, 2017, 12:39am UTC](https://forum.ansible.com/t/copy-file-s-locally-in-ansible-machine/25470/2 "2017-09-13T00:39:29Z")

</div>

Either use hosts: localhost or delegatge\_to: localhost
