# use with\_items from hosts which tasks failed on - Explanation below:

**URL:** <https://forum.ansible.com/t/use-with-items-from-hosts-which-tasks-failed-on-explanation-below/28475>\
**Category:** Ansible Project\
**Created:** [August 30, 2018, 8:20pm UTC](https://forum.ansible.com/t/use-with-items-from-hosts-which-tasks-failed-on-explanation-below/28475 "2018-08-30T20:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian.mitchellkriel](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@julian.mitchellkriel](https://forum.ansible.com/u/julian.mitchellkriel)\
**Post date:** [August 30, 2018, 8:20pm UTC](https://forum.ansible.com/t/use-with-items-from-hosts-which-tasks-failed-on-explanation-below/28475/1 "2018-08-30T20:20:00Z")

</div>

Hey guys,

I will try be as thorough as possible here, have a issue and I do not know if I am following the correct route or even if it is possible to achieve what I want.

I have a playbook which I will list below, that simply checks if port 110 and 143 is up on a box, do a compare on a return code.

This playbook is simple and works 100% it is the step after this I am having issues with.  
Playbook:

---

<div class="post-metadata">

**Author:** ![julian.mitchellkriel](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@julian.mitchellkriel](https://forum.ansible.com/u/julian.mitchellkriel)\
**Post date:** [August 30, 2018, 8:25pm UTC](https://forum.ansible.com/t/use-with-items-from-hosts-which-tasks-failed-on-explanation-below/28475/2 "2018-08-30T20:25:12Z")

</div>

to add a correction :

Currently the issue is, if it finds one it sends a blank notification or finds one port failed and declares them all failed
