# Question on Ansible remote copy

**URL:** <https://forum.ansible.com/t/question-on-ansible-remote-copy/22934>\
**Category:** Ansible Project\
**Created:** [November 1, 2016, 9:16pm UTC](https://forum.ansible.com/t/question-on-ansible-remote-copy/22934 "2016-11-01T21:16:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GC-Ansible-User](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@GC-Ansible-User](https://forum.ansible.com/u/GC-Ansible-User)\
**Post date:** [November 1, 2016, 9:16pm UTC](https://forum.ansible.com/t/question-on-ansible-remote-copy/22934/1 "2016-11-01T21:16:18Z")

</div>

Have a question regarding remote to remote copy of files.

I have a situation where I need to generate a file on one remote server. The file then has to be copied across multiple servers (the list of servers is specified in the inventory file as a group) from this remote server.

What would be the most effective way of doing this in Ansible. I am using Ansible 2.1.

[master]  
host1  
[clients]  
host2  
host3  
host4

Generate a file on host1 and then copy the files to host2, host3, host4. I don’t want to hard code the host2, host3 and host4 in the Ansible task. I want that to be a list dynamically generated based on the clients group in the inventory.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 2, 2016, 12:49am UTC](https://forum.ansible.com/t/question-on-ansible-remote-copy/22934/2 "2016-11-02T00:49:39Z")

</div>

You can do it several ways, I recommend you fetch/slurp from host1 and then use copy to the rest.
