When executing a playbook, I'm trying to report on Unreachable hosts:
PLAY RECAP *********************************************************************************************************************
testinstance01 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
testinstance02 : ok=8 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
I looked at creating a ping task, however I noticed that Ansible is clever enough to see that a host is Unreachable
and continue on regardless. I figured that it will have this detail stored as metadata or in facts
and I wondered how to extract/access this detail?
The overall idea, being I can fire this audit playbook, weekly in the early hours and I'll get results from the online hosts as well as a list of hosts that were Unreachable.