Thanks I'll take a look at this today and see what I can find out.



On Mon, Aug 11, 2014 at 6:22 PM, Jean-Francois Chevrette <[email protected]
> wrote:

> Yes it is and as suggested I posted it to the groups.
>
> I had failed to describe that the issue is that both handlers with the
> same name are called even though there is only one caller. (one handler
> notifying 'restart xyz' and BOTH 'restart xyz' handlers are called)
>
>
> Thanks Michael
>
>
> On Monday, August 11, 2014 6:01:54 PM UTC-4, Michael DeHaan wrote:
>
>> Was this your ticket?
>>
>> https://github.com/ansible/ansible/issues/8553
>>
>> If so, see the comment I closed it with for some more info.
>>
>> If not, let me know.
>>
>>
>>
>>
>>
>> On Mon, Aug 11, 2014 at 5:25 PM, Jean-Francois Chevrette <
>> [email protected]> wrote:
>>
>>> Hey everyone,
>>>
>>> I'm having an issue where two handlers with the same name from two
>>> different roles are both being called during a playbook run.
>>>
>>> Gist here: https://gist.github.com/jfchevrette/b8f5edcd94b32284d53f
>>>
>>> I have two roles: first and second
>>>
>>> First role has a handler called 'restart xyz'
>>> Second role has a handler also called 'restart xyz'
>>> Second role has a handler called 'reconfigure xyz' which then notifies
>>> 'restart xyz'
>>>
>>> (Real-life scenario: suppose I have two roles for two applications and
>>> both require a restart of my webserver while one of them requires a
>>> reconfiguration before the restart)
>>>
>>> Since roles are read alphabetically (AFAIK), I'm expecting the 'restart
>>> xyz' to be called from the first role once handler 'reconfigure xyz'
>>> notifies it from the second role.
>>>
>>> If I only call the 'second' role using it's tag (defined in my
>>> playbook), the "restart xyz" handler will be called twice (once from the
>>> 'second' role handlers, then from the 'first' role handlers). I would
>>> expect it to be called only once (from the 'first' role) as I've been told
>>> it's a global namespace for handlers.
>>>
>>> (Real-life scenario: I only want to ensure my second application is
>>> configured properly, which then reconfigures my webserver and restart it.
>>> Both restart handlers are called and my webserver is restarted twice)
>>>
>>> I hope my example is not too confusing.
>>>
>>> I poked around in the source code but couldn't find anything obvious.
>>>
>>> Should I open a bug report?
>>>
>>>  --
>>> 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/e7f81bd1-70d9-42d3-832c-
>>> 753872112a33%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/e7f81bd1-70d9-42d3-832c-753872112a33%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> 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/5b6d8c98-176d-4ca4-9617-e0809f387f2d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/5b6d8c98-176d-4ca4-9617-e0809f387f2d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgxUg%3DUmRjbO_jOW8fu_E0yZg9E4EGdVkpgWyjiNGx%2Bf6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to