so to clarify: > * notify is contained within the scope of a play correct
> * a role within a playbook constitutes a single play incorrect > * notify does not propagate outside the play and will not be picked up by > handlers outside of the play (i.e., role) correct up to the i.e, which is wrong > * role dependencies will not allow you to propagate the notify across roles > - it behaves as two separate, autonomous plays incorrect > * handler names are global but the notify to invoke them is local to the > role first 1/2 is correct (up to 'but'), the 2nd half is incorrect So now im just going to mostly repeat data you can find here (expanding a bit): http://docs.ansible.com/ansible/playbooks_intro.html#handlers-running-operations-on-change * roles can only exist INSIDE a play so they are always part of a play and do not define a play themselves. * a play can have multiple roles and/or tasks, either directly or indirectly included, through roles, include directive or role dependencies. * in a file (playbook) you can have several plays, handlers are local to each play and not notifiable across plays. * dependencies should include a role in the same play as the dependent role, which includes it's handlers. * handler names must be unique in the play, or they will overwrite each other, meaning you can only execute one of them. * any task in a play can notify any handler in the play, except a latter handler at the end of a play. * notified handlers get processed between ‘pre_tasks’, ‘roles’, ‘tasks’, and ‘post_tasks’ sections or when you invoke them through "meta: flush_hanlders". * running a handler clears it from the notification list, but it can be notified again by any task, except a latter handler at the end of a play. ------ Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8kfAeTUK6B5gQ1558zfrRJzT3NqHoBed_g05bKiF3c-_A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
