# Outputting stdout/stderr as it comes in

**URL:** <https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [November 13, 2012, 4:14pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082 "2012-11-13T16:14:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [November 13, 2012, 4:14pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082/1 "2012-11-13T16:14:19Z")

</div>

It's currently not possible. The closest thing we have is the way  
async can poll in a playbook. It may be possible to fiddle with  
async\_wrapper  
to get it to do something like this. It will probably have to pass  
in some additional flags over to the async command or feed them to  
async\_wrapper  
somehow.

I will warn you that the async code is not trivial and has warped my  
brain on many occasions. However, I think this may make it more fun  
to work on 🙂

--Michael

---

<div class="post-metadata">

**Author:** ![Dmitry\_Horbach](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Dmitry\_Horbach](https://forum.ansible.com/u/Dmitry_Horbach)\
**Post date:** [July 4, 2013, 7:58am UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082/2 "2013-07-04T07:58:00Z")

</div>

Hi All.

Did anyone looked at having stdout printing as it comes or it is still hard to implement?  
When it comes to calling third-party bash scripts - not being able to show its output is quite limiting when implementing any deployment process (some legacy scripts run 1-2 hours for example giving lot of output which can’t be returned as json)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 4, 2013, 12:03pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082/3 "2013-07-04T12:03:38Z")

</div>

Async mode could be upgraded to capture intermediate stdout/stderr as it comes in, possibly.

I don’t want this done for non-async modes as it wouldn’t make architectural sense.

---

<div class="post-metadata">

**Author:** ![Wes\_Hayutin](https://avatars.discourse-cdn.com/v4/letter/w/85e7bf/32.png) [@Wes\_Hayutin](https://forum.ansible.com/u/Wes_Hayutin)\
**Post date:** [October 6, 2014, 1:21pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082/4 "2014-10-06T13:21:41Z")

</div>

Hey Mike!  
Hope all is well, wondering if there any updates on outputting stdout/stderr ?

Thanks!

---

<div class="post-metadata">

**Author:** ![Wes\_Hayutin](https://avatars.discourse-cdn.com/v4/letter/w/85e7bf/32.png) [@Wes\_Hayutin](https://forum.ansible.com/u/Wes_Hayutin)\
**Post date:** [October 6, 2014, 1:25pm UTC](https://forum.ansible.com/t/outputting-stdout-stderr-as-it-comes-in/12082/5 "2014-10-06T13:25:18Z")

</div>

nvrmind…  
I see your comments in another thread… and you pointed to [http://docs.ansible.com/playbooks\_async.html](http://docs.ansible.com/playbooks_async.html)

thanks
