# Synchronize module host access has a different behaviour from other modules

**URL:** <https://forum.ansible.com/t/synchronize-module-host-access-has-a-different-behaviour-from-other-modules/28318>\
**Category:** Ansible Project\
**Created:** [August 13, 2018, 11:29am UTC](https://forum.ansible.com/t/synchronize-module-host-access-has-a-different-behaviour-from-other-modules/28318 "2018-08-13T11:29:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Coote](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tim\_Coote](https://forum.ansible.com/u/Tim_Coote)\
**Post date:** [August 13, 2018, 11:29am UTC](https://forum.ansible.com/t/synchronize-module-host-access-has-a-different-behaviour-from-other-modules/28318/1 "2018-08-13T11:29:47Z")

</div>

I don’t know whether this is deliberate or not, but I cannot get the synchronize module to route to my computers, when all other modules are content.

All of the controlled hosts are behind firewalls that I do not control, so access is via a reverse ssh tunnel. The inventory file has entries like this:

`host_1234 ansible_host=localhost:1234 ansible_user=username host_key_checking=false`

the ansible\_ssh\_common\_args are set in group\_vars/all as:

`ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o ProxyCommand="ssh -W %h: -q jumphost"'`

where `jumphost` is where the controlled computers log into and set up reverse ssh proxies.

Commands such as:  
`ansible ping -i hosts host_1234 -m ping host_1234 | SUCCESS => { "changed": false, "ping": "pong" }`

work as expected. However, the embedded rsync command in the synchronize module cannot resolve to the target host. It constructs the wrong rsync command:  
`ansible -vvv -i hostfile host_1234 -m synchronize -a "src=/var/log/daemon.log dest=daemon"`, creates:

`/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --out-format=<<CHANGED>>%i %n%L /var/log/daemon.log [username@localhost:1234]:daemon`

A working rsync command is:  
`rsync -avz -e "ssh -A jumphost ssh -p 1234" username@localhost:/var/log/daemon.log daemon/`

Is this a bug or a missing feature? Is the issue with ansible’s parameter construction, or synchronize’s use of them?

Tim
