# Conditional Includes: Is it possible to continue if no file matches are met?

**URL:** <https://forum.ansible.com/t/conditional-includes-is-it-possible-to-continue-if-no-file-matches-are-met/13698>\
**Category:** Ansible Project\
**Created:** [October 16, 2013, 8:39pm UTC](https://forum.ansible.com/t/conditional-includes-is-it-possible-to-continue-if-no-file-matches-are-met/13698 "2013-10-16T20:39:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brice\_Burgess](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Brice\_Burgess](https://forum.ansible.com/u/Brice_Burgess)\
**Post date:** [October 16, 2013, 8:39pm UTC](https://forum.ansible.com/t/conditional-includes-is-it-possible-to-continue-if-no-file-matches-are-met/13698/1 "2013-10-16T20:39:19Z")

</div>

We have a situation where we would like to include a variable file only if it is present, and not to include any other. Specifically we want the ability to optionally set variables per passed “git\_branch” in a project. An example playbook:

---

<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:** [October 16, 2013, 8:50pm UTC](https://forum.ansible.com/t/conditional-includes-is-it-possible-to-continue-if-no-file-matches-are-met/13698/2 "2013-10-16T20:50:02Z")

</div>

There’s no other syntax so the blank file is fine.

---

<div class="post-metadata">

**Author:** ![Brice\_Burgess](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Brice\_Burgess](https://forum.ansible.com/u/Brice_Burgess)\
**Post date:** [October 16, 2013, 8:58pm UTC](https://forum.ansible.com/t/conditional-includes-is-it-possible-to-continue-if-no-file-matches-are-met/13698/3 "2013-10-16T20:58:58Z")

</div>

Michael,

Cool. I’ve gone ahead and moved the blank file from the host\_vars directory to elsewhere in order to dispel the confusion and speedup file lookups in that directory! 🙂 Owe you for that motivation. Have been struggling to deliver an organizational structure that makes sense and is fully up to date w/ latest ansible 1.4… although am beginning to see the light!
