http://www.ansibleworks.com/docs/playbooks.html#handlers-running-operations-on-change says:
“These ‘notify’ actions are triggered at the end of each block of tasks in a playbook”
What’s a block of tasks: the set of tasks within a role, or all the tasks in all roles combined?
It looks like the latter. I tried to use a handler to do an apt update cache only if a new PPA has been added, but it fails:
==> s1-macmini.yml <==
This playbook runs against the localhost, assuming it is a Mac Mini
and is acting in the s1 role
- hosts: s1
connection: local
roles: - macmini-ubuntu-repos
- macmini-ubuntu-packages
==> roles/macmini-ubuntu-repos/tasks/main.yml <==