Okay, what about making ansible run any queued up handlers just before 
exiting, even if it exits due to an error condition in a playbook?

Anand

On Saturday, 30 November 2013 18:04:55 UTC+1, Michael DeHaan wrote:

Not sure that's an option that fits all use cases.
>
> -- Michael
>
> On Nov 30, 2013, at 11:40 AM, Anand Buddhdev <[email protected]<javascript:>> 
> wrote:
>
> On Friday, 29 November 2013 17:14:37 UTC+1, Michael DeHaan wrote:
>
> Hi Michael,
>
> Yep, this is a thing, there's no way to force running all of the handlers. 
>>   
>>
>> There's a feature request open for something like --force-handlers that 
>> would be super easy to add.
>>
>> But would you generically want to run all of them in every case?  Might 
>> not work for everyone.  Might though.
>>
>
> I have also run into this issue, where an error in a playbook will cause 
> ansible to stop, and fail to run any requested handlers, which can leave a 
> daemon running with an old configuration, for example. This kind of breaks 
> ansible's idempotent feature. Instead of --force-handlers, what about if 
> ansible were to maintain a persistent cache of requested handlers (in a 
> file, for example) and apply them at the next run?
>
> In our case, we use ansible in local mode, so we can't always see if a 
> playbook run failed or not, and if ansible kept a cache of handlers, and 
> deleted it only when they were applied, it would solve this problem without 
> requiring a --force-handlers option.
>
> Regards,
>
> Anand
>
> -- 
> 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] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

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

Reply via email to