# delegate\_to hanging

**URL:** <https://forum.ansible.com/t/delegate-to-hanging/26497>\
**Category:** Ansible Project\
**Created:** [January 17, 2018, 6:29am UTC](https://forum.ansible.com/t/delegate-to-hanging/26497 "2018-01-17T06:29:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopi\_Krishna](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@Gopi\_Krishna](https://forum.ansible.com/u/Gopi_Krishna)\
**Post date:** [January 17, 2018, 6:29am UTC](https://forum.ansible.com/t/delegate-to-hanging/26497/1 "2018-01-17T06:29:43Z")

</div>

Hi,

my playbook file:

- hosts: oraclesource[0]  
tasks:
- name: Copy Remote-To-Remote (from serverA to serverB)  
synchronize: src=/root/gopi dest=/root/gopi  
delegate\_to: “{{groups[‘oraclesource’][1]}}”

my hosts file:

[oraclesource]  
xx.xx.xx.xx  
xx.xx.xx.xx

while i’m running the above play book by passing my hosts file, the porgramme is being stuck at the following part,

TASK [Copy Remote-To-Remote (from serverA to serverB)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /root/anisble\_examples/ebs/copy\_remote\_to\_remote.yml:17  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/synchronize.py  
\<10.210.8.150\> ESTABLISH SSH CONNECTION FOR USER: root  
\<10.210.8.150\> SSH: EXEC sshpass -d11 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/a26ba33a59 10.210.8.150 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’“‘’  
\<10.210.8.150\> (0, ‘/root\n’, ‘’)  
\<10.210.8.150\> ESTABLISH SSH CONNECTION FOR USER: root  
\<10.210.8.150\> SSH: EXEC sshpass -d11 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/a26ba33a59 10.210.8.150 '/bin/sh -c '”‘"’( umask 77 && mkdir -p “`echo /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507`” && echo ansible-tmp-1516168906.11-82482042554507=“`echo /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507`” ) && sleep 0’“'”‘’  
\<10.210.8.150\> (0, ‘ansible-tmp-1516168906.11-82482042554507=/root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507\n’, ‘’)  
\<10.210.8.150\> PUT /tmp/tmp9Qni3v TO /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/synchronize.py  
\<10.210.8.150\> SSH: EXEC sshpass -d11 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/a26ba33a59 ‘[10.210.8.150]’  
\<10.210.8.150\> (0, ‘sftp\> put /tmp/tmp9Qni3v /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/synchronize.py\n’, ‘’)  
\<10.210.8.150\> ESTABLISH SSH CONNECTION FOR USER: root  
\<10.210.8.150\> SSH: EXEC sshpass -d11 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/a26ba33a59 10.210.8.150 ‘/bin/sh -c ‘"’“‘chmod u+x /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/ /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/synchronize.py && sleep 0’”’“‘’  
\<10.210.8.150\> (0, ‘’, ‘’)  
\<10.210.8.150\> ESTABLISH SSH CONNECTION FOR USER: root  
\<10.210.8.150\> SSH: EXEC sshpass -d11 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/root/.ansible/cp/a26ba33a59 -tt 10.210.8.150 '/bin/sh -c '”‘"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/synchronize.py; rm -rf “/root/.ansible/tmp/ansible-tmp-1516168906.11-82482042554507/” \> /dev/null 2\>&1 && sleep 0’“'”‘’

can anyone tell me whats wrong with the code or what exactly happening
