Thanks. Yes, I had the blocks there because I had been playing with the
rescue approach earlier.
On Friday, August 4, 2017 at 11:29:31 AM UTC-5, Kai Stian Olstad wrote:
>
> On 04. aug. 2017 17:45, William McKenzie wrote:
> > OK, this works: you store the results, clear errors on hosts and look
> for
> > problem children.
> >
> >
> > ---
> > - hosts: all
> > gather_facts: no
> > tasks:
> > - block:
> > - setup:
> > register: result
> >
> > - name: clearing host errors
> > meta: clear_host_errors
> >
> > - block:
> > - local_action:
> > module: slack
> > token: "redacted"
> > msg: "Ping failed on host {{inventory_hostname}}"
> > when: result.unreachable is defined
> It will only work if at least one host is reachable, but that's probably
> good enough.
>
> By the way, you don't need your two block: since they only have one task
> each.
>
> --
> Kai Stian Olstad
>
--
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/4dbbceeb-32e4-4482-9947-bfbdf779b3cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.