# ansible\_play\_batch equivalant which excludes failed hosts?

**URL:** <https://forum.ansible.com/t/ansible-play-batch-equivalant-which-excludes-failed-hosts/23085>\
**Category:** Ansible Project\
**Created:** [November 23, 2016, 6:42pm UTC](https://forum.ansible.com/t/ansible-play-batch-equivalant-which-excludes-failed-hosts/23085 "2016-11-23T18:42:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [November 23, 2016, 6:42pm UTC](https://forum.ansible.com/t/ansible-play-batch-equivalant-which-excludes-failed-hosts/23085/1 "2016-11-23T18:42:53Z")

</div>

I’m using pause with a prompt to display a list of devices that the current role is about to applied to. Here’s an example:

`

- name: Prompting To Continue  
pause:  
prompt: \>

---

<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:** [November 23, 2016, 6:49pm UTC](https://forum.ansible.com/t/ansible-play-batch-equivalant-which-excludes-failed-hosts/23085/2 "2016-11-23T18:49:04Z")

</div>

That was a bug and should be fixed in current devel, ansible\_play\_batch and ansible\_play\_hosts should only reflect ‘current’ hosts.

---

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [November 23, 2016, 7:03pm UTC](https://forum.ansible.com/t/ansible-play-batch-equivalant-which-excludes-failed-hosts/23085/3 "2016-11-23T19:03:29Z")

</div>

Thanks Brian!
