Tasks in rescue don't work if host is unreachable

25 views
Skip to first unread message

kaufma...@gmail.com

unread,
Mar 19, 2017, 6:29:48 PM3/19/17
to Ansible Project
Hello everyone,

For error handling I'm trying to use "block - rescue". I looked im internet and found out that rescue doesn't have any effekt if tasks in block failed because of unreachable host. Does anyone any workaround or idea how to manage it anyway?

Thank you very much!

Vlad
Message has been deleted

Graham Dougan

unread,
Jan 19, 2018, 9:59:35 AM1/19/18
to Ansible Project
Hi Vlad,

Struggling with the same issue, did you get anywhere with it?

Thanks,
Graham

Graham Dougan

unread,
Jan 19, 2018, 9:59:35 AM1/19/18
to Ansible Project
Hi Vlad,

Struggling with the same issue, did you get anywhere with it?

Thanks,
Graham

On Sunday, March 19, 2017 at 10:29:48 PM UTC, kaufma...@gmail.com wrote:

J Hawkesworth

unread,
Jan 23, 2018, 3:02:10 AM1/23/18
to Ansible Project
I suggest you delegate your rescue tasks to localhost - when things go wrong on remote hosts, the local host, where ansible is running, is the most likely thing to still be working.  Documentation about delegation is here if you aren't familiar with it: http://docs.ansible.com/ansible/latest/playbooks_delegation.html

You may need to adjust what you rescue actually does because of this - perhaps send a mail or message to get a human involved.

Hope this helps,

Jon
Reply all
Reply to author
Forward
0 new messages