# synchronize module hangs after syncing files

**URL:** <https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448>\
**Category:** Ansible Project\
**Created:** [October 6, 2014, 10:18pm UTC](https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448 "2014-10-06T22:18:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paradigm100](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@paradigm100](https://forum.ansible.com/u/paradigm100)\
**Post date:** [October 6, 2014, 10:18pm UTC](https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448/1 "2014-10-06T22:18:03Z")

</div>

hi ,

when doing this task :

- name: rsync cms\_tcl code to server  
synchronize:  
src=/home/user/code\_checkout/cms\_tcl  
dest=/var/www/wsgi/code recursive=yes

ansible hangs but i can see that the folder has been rsync’d correctly

GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
 ESTABLISH CONNECTION FOR USER: user on PORT 22 TO host  
 REMOTE\_MODULE setup  
 EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412632555.94-137539659496075 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412632555.94-137539659496075 && echo $HOME/.ansible/tmp/ansible-tmp-1412632555.94-137539659496075’  
 PUT /tmp/tmpBIAyoA TO /home/user/.ansible/tmp/ansible-tmp-1412632555.94-137539659496075/setup  
 EXEC /bin/sh -c ‘LANG=C LC\_CTYPE=C /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1412632555.94-137539659496075/setup’  
ok: [host]

TASK: [code-deploy | rsync cms\_tcl code to server] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
\<127.0.0.1\> EXEC [‘/bin/sh’, ‘-c’, ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412632556.27-122378061898864 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412632556.27-122378061898864 && echo $HOME/.ansible/tmp/ansible-tmp-1412632556.27-122378061898864’]  
\<127.0.0.1\> PUT /tmp/tmprgIgZr TO /home/user/.ansible/tmp/ansible-tmp-1412632556.27-122378061898864/synchronize  
\<127.0.0.1\> EXEC [‘/bin/sh’, ‘-c’, u’LANG=C LC\_CTYPE=C /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1412632556.27-122378061898864/synchronize’]

i then have to end it with Ctrl+c

when doing it for the second time it works ok (rsync has nothing to sync)

Thanks

---

<div class="post-metadata">

**Author:** ![paradigm100](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@paradigm100](https://forum.ansible.com/u/paradigm100)\
**Post date:** [October 8, 2014, 5:15am UTC](https://forum.ansible.com/t/synchronize-module-hangs-after-syncing-files/16448/2 "2014-10-08T05:15:37Z")

</div>

I belive i found the issue ,

Just ran the rsync using the shell module with rsync , it worked great and did not hang  
until i turned on verbrose mode with rsync (-v).  
The directory i'm rsyncing from has a lot of very old files which origenaly came from  
a windows file system and contain some kind of encoding that ansible doesnt like.  
If someone has an idea howto find the specific file name creating the issue i could  
try to repreduce and open a bug.

Thanks
