# Register var is var|succes when it was skipped (check\_mode)

**URL:** <https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067>\
**Category:** Ansible Developer\
**Created:** [August 29, 2014, 8:27am UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067 "2014-08-29T08:27:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_Moser](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rene\_Moser](https://forum.ansible.com/u/Rene_Moser)\
**Post date:** [August 29, 2014, 8:27am UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067/1 "2014-08-29T08:27:09Z")

</div>

Hi

I recently created a bug report [https://github.com/ansible/ansible/issues/8753](https://github.com/ansible/ansible/issues/8753) for this unexpected behaviour which was closed.

While it is not a big “deal” to fix it using always\_run in the command task. I still think it is a bug.

In the docs [http://docs.ansible.com/playbooks\_variables.html#filters-often-used-with-conditionals](http://docs.ansible.com/playbooks_variables.html#filters-often-used-with-conditionals) this case is exactly described. It says there are 4 states of a variable

- success → task state is changed and/or ok

- failed → task state is failed

- skipped → task state is skipped

- changed → task state is changed

In my use case, the task is skipped but it is marked as successful. So the question is, is a task successful when it was skipped?

Thanks for your clarification.

Regards

René

---

<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:** [September 2, 2014, 11:41pm UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067/2 "2014-09-02T23:41:20Z")

</div>

Hmm, that does read differently now that you have highlighted it.

A skipped task does have a “skipped: True”, but it’s also successful (because it’s not a failure).

I could possibly be open to the persuassion that “|sucess” shouldn’t be true for skipped tasks, but that it should still return what it does when registering a skipped task.

---

<div class="post-metadata">

**Author:** ![Rene\_Moser](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rene\_Moser](https://forum.ansible.com/u/Rene_Moser)\
**Post date:** [September 5, 2014, 9:03am UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067/3 "2014-09-05T09:03:44Z")

</div>

Hi

---

<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:** [September 5, 2014, 2:08pm UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067/4 "2014-09-05T14:08:25Z")

</div>

Yeah if you want to send in a PR to core.py that would be welcome - if not, please file a feature request in github.

I suspect it will be super simple.

---

<div class="post-metadata">

**Author:** ![Rene\_Moser](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Rene\_Moser](https://forum.ansible.com/u/Rene_Moser)\
**Post date:** [September 8, 2014, 6:41am UTC](https://forum.ansible.com/t/register-var-is-var-succes-when-it-was-skipped-check-mode/16067/5 "2014-09-08T06:41:13Z")

</div>

Hi
