# Copy files between two remote servers WITHOUT synchronize module

**URL:** <https://forum.ansible.com/t/copy-files-between-two-remote-servers-without-synchronize-module/30228>\
**Category:** Ansible Project\
**Created:** [May 1, 2019, 1:10am UTC](https://forum.ansible.com/t/copy-files-between-two-remote-servers-without-synchronize-module/30228 "2019-05-01T01:10:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen\_Collins](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glen\_Collins](https://forum.ansible.com/u/Glen_Collins)\
**Post date:** [May 1, 2019, 1:10am UTC](https://forum.ansible.com/t/copy-files-between-two-remote-servers-without-synchronize-module/30228/1 "2019-05-01T01:10:26Z")

</div>

Hello all!

I have an issue in my environment where I cannot use the synchronize module to transfer data between two remote nodes. So I need a different way to do this.

ServerA: Ansible Server (Tower Instance)  
ServerA1: Ansible Server (Tower Instance)  
ServerA2: Ansible Server (Tower Instance)

ServerB: Data Server

ServerC: User Server

I want to run a playbook on ServerA and have it copy a/many file(s) from ServerB to ServerC. I cannot use synchronize do to environmental issues. So how can I get this done ether using copy or fetch modules. Or something else like SCP from the shell or command module.

I cannot find a good example of doing this other than the synchronize module. I do not want to just copy the data files to the tower servers. I need to keep my environment the same as it is today without changes.

I’m using ansible 2.7. These are all Redhat Linux Servers.

Here is a sample I tried. Really simple but…Inventory comes from tower server which is why the hosts says “all”

---

<div class="post-metadata">

**Author:** ![shivharsh.nec](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@shivharsh.nec](https://forum.ansible.com/u/shivharsh.nec)\
**Post date:** [May 1, 2019, 1:36pm UTC](https://forum.ansible.com/t/copy-files-between-two-remote-servers-without-synchronize-module/30228/2 "2019-05-01T13:36:24Z")

</div>

Hi Glen,

You may use copy and fetch module as shown below:  
In the below playbook the files would be fetch from source machine and stored temporarily on the control node and then copied to the destination.

`
