Yes having the same issue with silent fails. I would prefer to exit with 
error if not possible. Gets you confused. 

On Wednesday, March 20, 2013 12:24:05 AM UTC+1, Peter Pletcher wrote:
>
> Greetings, new Ansible user here.  First I'd like to add to the chorus of 
> thanks for a great automation tool.
>
> One situation that came up early for our site is the need to notify 
> handlers from other handlers.  This is nice for example when a service 
> needs to be restarted after another service was restarted (for whatever 
> reason).
>
> Turns out you can do this fine but I did find a couple of "gotchas":
> - Notifies are only run in the order defined (not the order listed in a 
> notify list)
> - A handler cannot notify a handler defined before it, this silently fails!
>
> Here's a short example playbook that shows what I mean:
>
> ---
> - hosts: all
>
>   tasks:
>
>   - name: notify test
>     action: shell echo "notify test action"
>     notify:
>       - notify test 2
>     tags: testing
>
>   handlers:
>
>   - name: notify test 1
>     action: shell echo "notify test 1"
>
>   - name: notify test 2
>     action: shell echo "notify test 2"
>     notify:
>       - notify test 4
>       - notify test 1
>       - notify test 3
>
>   - name: notify test 3
>     action: shell echo "notify test 3"
>
>   - name: notify test 4
>     action: shell echo "notify test 4"
>
> You might expect the results of the task notifying "notify test 2" to 
> subsequently trigger tests 4,1,3 but the actual result I get (ansible 1.0) 
> is:
>
> TASK: [notify test] ********************* 
> changed: [hostname]
>
> NOTIFIED: [notify test 2] ********************* 
> changed: [hostname]
>
> NOTIFIED: [notify test 3] ********************* 
> changed: [hostname]
>
> NOTIFIED: [notify test 4] ********************* 
> changed: [hostname]
>
> "notify test 1" just gets eaten, even specifying "-vvv" I saw no evidence 
> of it at all.
>
>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to