I'd like to find out how to ignore/handle the UNREACHABLE error. The
reason is that I want to use Ansible to loop through my hosts
monitored_systems and if any of those systems ever get reimaged, then I
want to reestablish ssh. Here's what I have, but UNREACHABLE doesn't honor
"ignore_errors: True".
- hosts: monitored_systems
gather_facts: False
tasks:
- name: ping system
ping:
register: result
ignore_errors: True
- name: if ping failed then run this
command: script/estab_conn.sh {{ ansible_hostname }}
when: result|failed
delegate_to: localhost
- name: rerun ping
ping:
when: result|failed
--
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/60cac775-3552-4320-9116-af62833f1470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.