# Checking if with\_fileglob is empty

**URL:** <https://forum.ansible.com/t/checking-if-with-fileglob-is-empty/14348>\
**Category:** Ansible Project\
**Created:** [January 15, 2014, 1:17pm UTC](https://forum.ansible.com/t/checking-if-with-fileglob-is-empty/14348 "2014-01-15T13:17:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erkan\_yanar](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@erkan\_yanar](https://forum.ansible.com/u/erkan_yanar)\
**Post date:** [January 15, 2014, 1:17pm UTC](https://forum.ansible.com/t/checking-if-with-fileglob-is-empty/14348/1 "2014-01-15T13:17:08Z")

</div>

Hi I tried something like:  
&nbsp;&nbsp;&nbsp;&nbsp;copy: src={{ item }} dest=/etc/mode=444  
&nbsp;&nbsp;&nbsp;&nbsp;with\_fileglob:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- abc/\*.cnf

So how to prevent the play from failing, when there is no file to glob?  
ignore\_errors: even did not work.

erkan

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [January 15, 2014, 2:47pm UTC](https://forum.ansible.com/t/checking-if-with-fileglob-is-empty/14348/2 "2014-01-15T14:47:10Z")

</div>

Can you paste the version of Ansible you are using and the output from running the task in verbose mode?

---

<div class="post-metadata">

**Author:** ![erkan\_yanar](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@erkan\_yanar](https://forum.ansible.com/u/erkan_yanar)\
**Post date:** [January 17, 2014, 10:11am UTC](https://forum.ansible.com/t/checking-if-with-fileglob-is-empty/14348/3 "2014-01-17T10:11:32Z")

</div>

Sorry everything is fine.  
A included file throw that error.
