# ansible 2.1.0 failures

**URL:** <https://forum.ansible.com/t/ansible-2-1-0-failures/22052>\
**Category:** Ansible Project\
**Created:** [July 19, 2016, 10:27pm UTC](https://forum.ansible.com/t/ansible-2-1-0-failures/22052 "2016-07-19T22:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dimon](https://forum.ansible.com/u/Dimon)\
**Post date:** [July 19, 2016, 10:27pm UTC](https://forum.ansible.com/t/ansible-2-1-0-failures/22052/1 "2016-07-19T22:27:07Z")

</div>

I keep on stepping on the same issue that I do not believe I’ve ever had in pre-2.1.0 versions (mind you I’ve had long gap since list I’ve built playbooks… so my references could go as far back as 1.9)

Here’s the issue:

`

- hosts: some\_hosts  
gather\_facts: False  
tasks:
- block:
- name: Run puppet agent  
puppet:  
register: puppet\_run  
failed\_when: puppet\_run.stdout.find(‘Finished catalog run in’) == -1 and puppet\_run.stdout.find(‘configuration client already in progress’) == -1

rescue:

- name: add host to the list of failed puppets  
add\_host: name={{ inventory\_hostname }} group=failed\_puppets

`

failed\_when works as expected so far, however at the end of the run I have only _one_ failed host in “failed\_puppets” instead of about 10 that ansible did recognize but for some reason refuses to do “add\_host” there. Delegating add\_host is not helping either.
