On 12. feb. 2017 18:47, Michael Ströder wrote:
Kai Stian Olstad wrote:
On 12. feb. 2017 17:56, Michael Ströder wrote:
But some updates might also require restart of a service managed in a
subsequently
invoked role which does not receive the notifications.
(In puppet I'd simply _subscribe_ to the resource to "pull" the notification.)
How to handle this case in ansible?
Ansible doesn't have something like subscribe so you'll have to use notify.
But you can notify a handler in another role since they are global.
But then a role has to know the handler names in the other role which somewhats
contradicts the concept of modular design.
The same challenge you have with subscribe in Puppet, you'll need to use
the other resources name.
You can always create the handler in the role so you don't need to use
the other roles handler, that's what I do to make them independent.
--
Kai Stian Olstad
--
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/7350cd91-749c-ca6f-72e9-c665b2b101ea%40olstad.com.
For more options, visit https://groups.google.com/d/optout.