ansible/ansible — pull request #6118 by tdfischer (2014-02-22 05:47:15+00:00)
Title: Expand templates inside of notify

This patch expands templates inside of the notify block, to allow for implementing 'hooks' in roles.

Example:
roles/hooked/main.yml:
```
---
- debug: Frobbing "{{thing}}"
notify: $onUpdate
```
main.yml:
```
---
hosts: all
roles:
- role: hooked
thing: "Something"
onUpdate:
- reload
- role: hooked
thing: "Something Else"
onUpdate:
- reload
- cleanup
handlers:
- name: reload
action: debug Reloaded
- name: cleanup
action: debug Cleaned up!
```

This results in the reload handler being executed once for each task, and the cleanup handler executing once for the second application of the hooked role.