# Recovering sdout/stderr from sudo commands in async mode

**URL:** <https://forum.ansible.com/t/recovering-sdout-stderr-from-sudo-commands-in-async-mode/19747>\
**Category:** Ansible Project\
**Created:** [November 12, 2015, 2:11pm UTC](https://forum.ansible.com/t/recovering-sdout-stderr-from-sudo-commands-in-async-mode/19747 "2015-11-12T14:11:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Angel\_De\_Bustos](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@Jose\_Angel\_De\_Bustos](https://forum.ansible.com/u/Jose_Angel_De_Bustos)\
**Post date:** [November 12, 2015, 2:11pm UTC](https://forum.ansible.com/t/recovering-sdout-stderr-from-sudo-commands-in-async-mode/19747/1 "2015-11-12T14:11:18Z")

</div>

Hi,

I have to execute sudo commands in async mode and I need to recover stdout and stderr.

I have written a module to do that but I am not able to recover the stdout and stderr.

All of this is done using a python script and the file indicate in results\_file is empty.

I am new with ansible and maybe the problem is that I not doing it in the right form.

Any ideas/suggestions?

Best regards,
