Don't think so. If a host unreachable, rescue never happens.

On Thu, Aug 3, 2017 at 2:01 PM, Nick Kakouros <[email protected]> wrote:

> You could probably do this with sth like this:
>
> (in a playbook)
>
> - host: unreachable_host
>   gather_facts: false
>   pre_tasks:
>   - block:
>       - name: Gathering facts
>         setup:
>     rescue:
>       - name: local task
>         debug:
>           msg: .....
>
>
> On Thursday, August 3, 2017 at 3:02:56 PM UTC+2, William McKenzie wrote:
>>
>> Seems like this should be pretty simple, but I can't seem to find a way
>> to do it. Is there some way to perform a local_action whenever a target is
>> unreachable? I just want to post to a slack channel if ping fails.
>>
>> ~Bill
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/v7sfxHaKbGQ/unsubscribe.
> To unsubscribe from this group and all its topics, 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/80167fe3-7a8f-4d4c-aead-11331ea55481%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/80167fe3-7a8f-4d4c-aead-11331ea55481%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAC7g-J0_n%3D0KJz8nPnMQoxhXBTONcWWuzj%2BuvABKpsmVogrYcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to