# When conditions doesn't work from ansible ansible-2.2.1.0-1.el7.noarch to ansible-2.3

**URL:** <https://forum.ansible.com/t/when-conditions-doesnt-work-from-ansible-ansible-2-2-1-0-1-el7-noarch-to-ansible-2-3/24371>\
**Category:** Ansible Developer\
**Created:** [May 2, 2017, 8:58am UTC](https://forum.ansible.com/t/when-conditions-doesnt-work-from-ansible-ansible-2-2-1-0-1-el7-noarch-to-ansible-2-3/24371 "2017-05-02T08:58:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martino\_Vigano](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Martino\_Vigano](https://forum.ansible.com/u/Martino_Vigano)\
**Post date:** [May 2, 2017, 8:58am UTC](https://forum.ansible.com/t/when-conditions-doesnt-work-from-ansible-ansible-2-2-1-0-1-el7-noarch-to-ansible-2-3/24371/1 "2017-05-02T08:58:30Z")

</div>

Hi,

I have a Centos7 central ansible server with version ansible-2.2.1.0

I have this code that works on version 2.2.1.0

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [May 2, 2017, 7:51pm UTC](https://forum.ansible.com/t/when-conditions-doesnt-work-from-ansible-ansible-2-2-1-0-1-el7-noarch-to-ansible-2-3/24371/2 "2017-05-02T19:51:33Z")

</div>

The variable registration happens even if a task is skipped or failed,  
that is why `when: oracle6196|failed` is possible.  
Since it failed, rc is not present.

---

<div class="post-metadata">

**Author:** ![Martino\_Vigano](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Martino\_Vigano](https://forum.ansible.com/u/Martino_Vigano)\
**Post date:** [May 3, 2017, 10:28am UTC](https://forum.ansible.com/t/when-conditions-doesnt-work-from-ansible-ansible-2-2-1-0-1-el7-noarch-to-ansible-2-3/24371/3 "2017-05-03T10:28:03Z")

</div>

Hi brian,

Sorry but I don't understand your answer

My code runs correctly in dry run mode with ansible 2.2.1.0.  
Then i upgrade only ansible to version 2.3 with the same environment and  
the same playbook.  
Under these conditions, the error appears

In ansible shell module doc i have this situation:

! [image.png|1336x598](https://forum.ansible.com/uploads/short-url/igOgZ6iGRDl7CDgFyxAgTTtvvH4.png)  
I expect that return value is always present

Thanks in advance.
