This is in response to this stackoverflow question The solution was posted by Vladimir Botka.
- YouTube walkthough here
When Ansible runs, it's great for setting up and configuring servers as per your playbooks and roles. But have you ever needed to collect a list of failed hosts where Ansible wasn't able to connect to them? In this demo I'm going to show you how to collect a list of failed and unreachable hosts.
I'm simply using a list of servers that don't exist, along with one remote server that I can get to.