- name: just for show, but here you can do any actions like
'bootstraping' the machines, removing from inventory, etc
debug:
msg: "{{ groups['unreachable'] }}"
I forgot to mention, the reason your rescue does not work is because
the task did not fail, but the host was unreachable.
block/rescue/always only acts on task failure, not host being
unreachable.
In my example above I ignore unreachable and task errors so the '2nd
play' can handle them differently.