# Synchronize between Remote hosts

**URL:** <https://forum.ansible.com/t/synchronize-between-remote-hosts/20013>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [December 15, 2015, 3:37am UTC](https://forum.ansible.com/t/synchronize-between-remote-hosts/20013 "2015-12-15T03:37:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sveera](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sveera](https://forum.ansible.com/u/sveera)\
**Post date:** [December 15, 2015, 3:37am UTC](https://forum.ansible.com/t/synchronize-between-remote-hosts/20013/1 "2015-12-15T03:37:02Z")

</div>

I am trying to synchronize data between remote hosts using the synchroni module.

HOST A-- Ansible Control Node  
HOST B- Host with Data or Source of the data that needs to be copied  
HOST C- Destination host where data needs to be copied

I can run the command below on HOSTB and execute it succesfully

rsync -avz --perms --chmod=777 -e “ssh -i privatekey.pem” Table ubuntu@HOSTC:/tmp

I have the following setup in a playbook and it gives me the error below when I am running the following playbook  
msg: unsupported parameter for module: ’ -avz --perms --chmod

- hosts: HOSTB  
user: ubuntu  
sudo: true  
vars\_files:
- vars/vars.yml  
tasks:
- name: Synchronize files from Source to dest  
synchronize: src={{ export\_directory }} dest={{ upload\_directory }} mode=push rsync\_opts= ‘-avz --perms --chmod=777 -e “ssh -i {{ key\_directory }}/{{ key }}”’  
delegate\_to: HOSTB

---

<div class="post-metadata">

**Author:** ![Paul\_Markham](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@Paul\_Markham](https://forum.ansible.com/u/Paul_Markham)\
**Post date:** [December 15, 2015, 3:59am UTC](https://forum.ansible.com/t/synchronize-between-remote-hosts/20013/2 "2015-12-15T03:59:30Z")

</div>

> According to the documentation, rsync\_opts needs to be an array, not a string. The last example in the documentation shows this:

```auto
synchronize:
    src: /tmp/helloworld
    dest: /var/www/helloword
    rsync_opts:
      - "--no-motd"
      - "--exclude=.git" 

```
