# Using when conditional with set\_facts and with\_items

**URL:** <https://forum.ansible.com/t/using-when-conditional-with-set-facts-and-with-items/20683>\
**Category:** Ansible Project\
**Created:** [February 25, 2016, 8:03pm UTC](https://forum.ansible.com/t/using-when-conditional-with-set-facts-and-with-items/20683 "2016-02-25T20:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Malobicky](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Jason\_Malobicky](https://forum.ansible.com/u/Jason_Malobicky)\
**Post date:** [February 25, 2016, 8:03pm UTC](https://forum.ansible.com/t/using-when-conditional-with-set-facts-and-with-items/20683/1 "2016-02-25T20:03:44Z")

</div>

Hello,

Using ansible v1.9.4, I am having an issue using set\_facts if combining with\_items and when conditional. I am tackling a new use case for our environment and have not tested with this any other version, since 1.9.4 is the production version.

When ‘when’ is not used, the ‘all\_files’ fact lists the basename properly.

`
