# Copy directory from remote

**URL:** <https://forum.ansible.com/t/copy-directory-from-remote/29433>\
**Category:** Ansible Developer\
**Created:** [January 14, 2019, 6:47am UTC](https://forum.ansible.com/t/copy-directory-from-remote/29433 "2019-01-14T06:47:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mangai](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Mangai](https://forum.ansible.com/u/Mangai)\
**Post date:** [January 14, 2019, 6:47am UTC](https://forum.ansible.com/t/copy-directory-from-remote/29433/1 "2019-01-14T06:47:45Z")

</div>



---

<div class="post-metadata">

**Author:** ![maxamillion](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/maxamillion/32/98_2.png) [@maxamillion](https://forum.ansible.com/u/maxamillion)\
**Post date:** [January 15, 2019, 4:16pm UTC](https://forum.ansible.com/t/copy-directory-from-remote/29433/2 "2019-01-15T16:16:27Z")

</div>

> ---  
> - name: sync pull task  
> &nbsp;&nbsp;hosts: localhost  
> &nbsp;&nbsp;connection: local  
> &nbsp;&nbsp;become: true  
> &nbsp;&nbsp;become\_user: user  
> &nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;- name: copying file using pull  
> &nbsp;&nbsp;&nbsp;&nbsp;synchronize:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src: /home/sss/mypath/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest: /home/user/ansibleworkspace/  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mode: pull  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsync\_path: "sudo\_rsync"  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recursive: true  
> &nbsp;&nbsp;&nbsp;&nbsp;delegate\_to: '{{ item }}'  
> &nbsp;&nbsp;&nbsp;&nbsp;with\_inventory\_hostnames: targetservers
> 
> I m trying to copy a directory from remote, but it's not happening. Its getting paused.
> 
> output:
> 
> user@thu:~/ansibleworkspace$ ansible-playbook checkremote.yml
> 
> PLAY [sync pull task] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> ok: [localhost]
> 
> TASK [copying file using pull] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> How to resolve it???

This mailing list is dedicated for development discussions about  
Ansible itself, user community support questions, discussion, and  
otherwise are recommended for the user's mailing list:  
[https://groups.google.com/forum/#!forum/ansible-project](https://groups.google.com/forum/#!forum/ansible-project)

Thank you,  
-AdamM
