Recovering stdout and stderr from sudo commands in async mode

Hi,

I have to run sudo commands in async mode and recover the stdout/stderr.

I have written a module to run sudo commands but I am not able to recover the stdout and stderr. All of this is done from a python script and in the json which is returned the file indicated in results_file is empty.

Any ideas/suggestions?

I am new to ansible so maybe there is a better way to do that.

Best regards,