Hi Brian. Using ignore unreachable and failing based on the condition of the register variable based on your example did the trick for me.
I appreciate your time and sharing. Br On Mon, Aug 21, 2023, 15:26 Brian Coca <[email protected]> wrote: > I forgot to mention, the reason your rescue does not work is because > the task did not fail, but the host was unreachable. > block/rescue/always only acts on task failure, not host being > unreachable. > > In my example above I ignore unreachable and task errors so the '2nd > play' can handle them differently. > > -- > ---------- > Brian Coca > > -- > 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/z59OlEEry9s/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CACVha7f1TPuddXu8fUJ%3DCgRM86AigR6PQ-yqRWLm%2BgPYFf1ugg%40mail.gmail.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGy0mf%2BHBPDKuJm74s9JSYEXH8sJPKuY962EGGQE-q%2BtuBtMug%40mail.gmail.com.
