# Conditional skipped?

**URL:** <https://forum.ansible.com/t/conditional-skipped/23242>\
**Category:** Ansible Project\
**Created:** [December 12, 2016, 7:50pm UTC](https://forum.ansible.com/t/conditional-skipped/23242 "2016-12-12T19:50:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Oliver](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@John\_Oliver](https://forum.ansible.com/u/John_Oliver)\
**Post date:** [December 12, 2016, 7:50pm UTC](https://forum.ansible.com/t/conditional-skipped/23242/1 "2016-12-12T19:50:17Z")

</div>

My little playbook:

- hosts: all  
become: true  
become\_user: root  
become\_method: sudo

tasks:

- name: Update McAfee virus definitions  
shell: /opt/McAfee/LinuxShield/bin/nails task --run 1  
register: result

- name: Update McAfee virus definitions 2  
shell: /opt/NAI/LinuxShield/bin/nails task --run 1  
when: result|failed

I did this because one of my hosts doesn’t have nails installed where the rest do. Why? Dunno. But when I run this, all of the hosts that have the first command run successfully are skipped, as I expected, but the one isn’t mentioned at all, other than the failure in the first case. That one host was completely skipped for the second command. Any ideas why?

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [December 13, 2016, 6:14am UTC](https://forum.ansible.com/t/conditional-skipped/23242/2 "2016-12-13T06:14:02Z")

</div>

When the a task fails for a host, Ansible will stop the play for that host and no subsequent task will be executed if ignore\_errors is not set to true.
