Hi,

we have a callback plugin which gathers information (warnings and errors) 
about tasks and should display a summary at the end in playbook_on_stats as 
a summary.

This is actually done by storing the information in a dict inside the 
callback plugin.

Unfortunately it seems that there is one instance per fork and in sum ist 
only the first one created used (the instance used on controller),

So we currently loose all data gathered during execution of forked tasks on 
the nodes if we set fork > 1.

Is one instance per fork expected behaviour and how should we synchronize 
it?

here are the relevant parts of code:_

class CallbackModule(object):

    saved_logs = {}
... 


    def runner_on_error(self, host, msg):

...   add something to saved_logs


    def playbook_on_stats(self, stats):

      output all of saved_logs

Some of the task which are creating logs are implemented as modules and run 
on the nodes and not on the controller - these information gets lost in 
playbook_on_stats

Do you have any hints?

Regards Micha

-- 
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/78ed6d79-947d-4ddd-8203-e3352653a91b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to