Re: [ansible-project] Outputting stdout/stderr as it comes in

1,573 views
Skip to first unread message

Michael DeHaan

unread,
Nov 13, 2012, 11:14:19 AM11/13/12
to ansible...@googlegroups.com
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

On Tue, Nov 13, 2012 at 10:52 AM, Yun Zheng Hu <yunzh...@gmail.com> wrote:
> Is it possible to follow the stdout/stderr output as it comes in? Instead
> for waiting for the command to finish I want to see the output as it comes
> in (preferably line buffered).
>
> For instance, grepping for something in a large log file or on several
> machines or maybe even tail -f a log file.
> If it's currently not possible I would be interested to add this feature
> myself :)
>
> Regards,
> Yun
>
> --
>
>

Dmitry Horbach

unread,
Jul 4, 2013, 3:58:00 AM7/4/13
to ansible...@googlegroups.com
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) 

Michael DeHaan

unread,
Jul 4, 2013, 8:03:38 AM7/4/13
to ansible...@googlegroups.com
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.




--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Wes Hayutin

unread,
Oct 6, 2014, 9:21:41 AM10/6/14
to ansible...@googlegroups.com
Hey Mike!
Hope all is well, wondering if there any updates on outputting stdout/stderr ?

Thanks!

Wes Hayutin

unread,
Oct 6, 2014, 9:25:18 AM10/6/14
to ansible...@googlegroups.com
nvrmind.. 
I see your comments in another thread.. and you pointed to http://docs.ansible.com/playbooks_async.html

thanks


On Thursday, 4 July 2013 08:03:38 UTC-4, Michael DeHaan wrote:
Reply all
Reply to author
Forward
0 new messages