Is there a way I could show a message when end_play is called?
I want to let user know why the playbook was terminated by giving a custom message.
Below is the first task in the playbook which checks the operation. It terminates only if operation is “NoChange”, else it continues with other tasks.
- name: Validate flag.
ansible.builtin.meta: end_play
when: orderedOperation == "NoChange"
I tried looking at the ansible documentation but didn’t found any parameter which could help.
Then, there is ansible.builtin.fail module, it has a parameter to set a message, but it fails the playbook.