I'm using pause with a prompt to display a list of devices that the current role is about to applied to. Here's an example:
- name: Prompting To Continue
pause:
prompt: >
#################################################################################################
Proceed with OSPF cost out? Enter to continue, Ctrl-c to abort.
{{ ansible_play_batch | sort | to_nice_yaml }}
#################################################################################################
when: enable_change_prompts
The problem is, if a host failed earlier in the playbook before this role was assigned, the following tasks will not be applied to it but it is still part of ansible_play_batch so it still shows up in the prompt. Any ideas on how to get the equivalant of ansible_play_batch minus any failed hosts?