# Ansible fetch only fetch specific file from directory not entire directory contents

**URL:** <https://forum.ansible.com/t/ansible-fetch-only-fetch-specific-file-from-directory-not-entire-directory-contents/31903>\
**Category:** Ansible Project\
**Created:** [January 6, 2020, 7:56am UTC](https://forum.ansible.com/t/ansible-fetch-only-fetch-specific-file-from-directory-not-entire-directory-contents/31903 "2020-01-06T07:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Kothawale](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@Vivek\_Kothawale](https://forum.ansible.com/u/Vivek_Kothawale)\
**Post date:** [January 6, 2020, 7:56am UTC](https://forum.ansible.com/t/ansible-fetch-only-fetch-specific-file-from-directory-not-entire-directory-contents/31903/1 "2020-01-06T07:56:58Z")

</div>

Hi Team

While working with ansible fetch feature which is one of the best feature I found in ansible, I found that ansible fetch will only pull in the single file form remote machine it can not fetch (pull) entire directory contents

form remote machine which I found while running playbook I got below message fetch cannot work on directories, not transferring, ignored",Is this some kind of ansible fetch drawback or will this be resolve in new

feature ?

Please let me know

Thanks,  
Vivek

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 6, 2020, 9:29am UTC](https://forum.ansible.com/t/ansible-fetch-only-fetch-specific-file-from-directory-not-entire-directory-contents/31903/2 "2020-01-06T09:29:04Z")

</div>

According to the comments on the 'src' parameter of the module on  
[https://docs.ansible.com/ansible/latest/modules/fetch\_module.html:](https://docs.ansible.com/ansible/latest/modules/fetch_module.html:)

The file on the remote system to fetch.  
This must be a file, not a directory.  
Recursive fetching may be supported in a later release.

---

<div class="post-metadata">

**Author:** ![Vivek\_Kothawale](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@Vivek\_Kothawale](https://forum.ansible.com/u/Vivek_Kothawale)\
**Post date:** [January 6, 2020, 10:20am UTC](https://forum.ansible.com/t/ansible-fetch-only-fetch-specific-file-from-directory-not-entire-directory-contents/31903/3 "2020-01-06T10:20:31Z")

</div>

FYI …
