Hello Kai,
Indeed, I can use ping to test the connectivity in all servers, hower the fatar error again can't be handled for example in a conditional form.
What I request is to be able to handle this result "fatal: [sles_11]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true}" , in order to for example to be able to write a message in a local log file.
This case is also describer in documentation of ansible:
"You can change this behavior with the --force-handlers
command-line option, or by including force_handlers: True
in a play, or force_handlers = True
in ansible.cfg. When handlers are forced, they will run when notified even if a task fails on that host. (Note that certain errors could still prevent the handler from running, such as a host becoming unreachable.)"
Is there any option to overcome this problem?
Thank you very much.