You can come close to this by doing something like the following:
- name: Initiate notification here
action: …
notify: reinstall
Then write the hander:
handlers:
-
name: Handler task 1 : Notification handler starting point
action: Whatever …
register: reinstall_notification_received -
name: Handler task 2
action: Whatever
when_changed: reinstall_notification_received
and so on and so forth. Handler tasks 1… n can be included in a handler task as well to shorten the parent playbook
Yes, annotating an include to indicate all contained actions should run as part of a handler would be nice. That’s in similar vein to a number of other desirables of attaching various stuff to includes. But the above has been sufficient for me as a workaround.