Callback-Plugin instance per fork - how to synchronize them?

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