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.


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/546bbd59-fcc5-4f25-8996-07611c2bb5a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to