[chef] Re: Re: Re: Printing command output


Chronological Thread 
  • From: Charles Johnson < >
  • To: Noah Kantrowitz < >,
  • Subject: [chef] Re: Re: Re: Printing command output
  • Date: Sat, 22 Nov 2014 12:38:49 -0800

I sometimes use Tom Weiss’ technique from this thread so I’m not buried by debug output:

http://stackoverflow.com/questions/17813592/how-can-i-display-the-output-of-a-opscode-chef-bash-command-in-my-console



Thanks,
--Charles


Charles Johnson — Solutions Architect

(510) 545-9485 –  /"> " style="color: rgb(105, 117, 130);">  – my: Linkedin  Twitter

CHEF

GETCHEF.COM

TM

getchef.com   Blog   Facebook   Twitter   Youtube


On November 21, 2014 at 2:55:14 PM, Noah Kantrowitz ( "> ) wrote:


On Nov 21, 2014, at 2:51 PM, Daniel DeLeo < > wrote:

>
>
> On Friday, November 21, 2014 at 1:37 PM, Bryan Baugher wrote:
>
>> Hi everyone,
>>
>> Whats the easiest way to print command output while its running? I've found older mailing list questions about this and things on SO but they mostly point to setting chef logging to debug which is not what I want. I would like to always print the output for this particular command as it often takes awhile to run and has valuable information.
>>
>> Bryan
> Setting the log level to info or debug is the only way currently: https://github.com/opscode/chef/blob/346aff0078a676d8c05319c017b891184426d004/lib/chef/provider/execute.rb#L55-L57
>
> It wouldn’t be too difficult to write a patch to let you toggle that yourself, if you’re interested. It would also be pretty easy to write your own variant of the execute resource that always sets a live stream.

You could use ruby_block resources before and after the execute to set/reset the log level I think.

--Noah






Archive powered by MHonArc 2.6.16.

§