# stat upside down

**URL:** <https://forum.ansible.com/t/stat-upside-down/15762>\
**Category:** Ansible Project\
**Created:** [July 24, 2014, 1:32pm UTC](https://forum.ansible.com/t/stat-upside-down/15762 "2014-07-24T13:32:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diogene\_Laerce](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Diogene\_Laerce](https://forum.ansible.com/u/Diogene_Laerce)\
**Post date:** [July 24, 2014, 1:32pm UTC](https://forum.ansible.com/t/stat-upside-down/15762/1 "2014-07-24T13:32:18Z")

</div>

Hi,

I have this strange issue. The following code was working fine (I think)  
as :

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 24, 2014, 10:43pm UTC](https://forum.ansible.com/t/stat-upside-down/15762/2 "2014-07-24T22:43:35Z")

</div>

That doesn’t quite follow for me.

However, I think you might really want this:

when: a is defined and a.stat.isfile

OR (depending on use case)

when: a is defined and not a.stat.isfile

Maybe try one of those first…
