[chef-dev] Re: STDIN


Chronological Thread 
  • From: Adam Jacob < >
  • To:
  • Cc:
  • Subject: [chef-dev] Re: STDIN
  • Date: Mon, 26 Sep 2011 12:20:17 -0700

Without more context it's hard to debug what is causing your error. In
general, asking for input this way is a very bad idea (as Chef is
usually intended to be run stand-alone, without a user at the
console.)

That said, there is no reason it won't work. You probably want to do
STDIN.gets, just for safety.

Best,
Adam

On Fri, Sep 23, 2011 at 5:23 AM,  
< >
 wrote:
> Hello All. Can anybody clarify that is CHEF able to work with  STDIN.
> Recipe should  take inputs that will allow  to set various variables .
> I tried to do it with ruby_block but it says “error: No such file or
> directory - -c”
> Here is ruby block :
>
> ruby_block "puts_some_text" do
> block do
> print("Enter your variable: ")
> STDOUT.flush
> a_string = gets
> puts a_string
> end
> action :create
> end
>



-- 
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: 



  • [chef-dev] STDIN, hiltov, 09/23/2011
    • [chef-dev] Re: STDIN, Adam Jacob, 09/26/2011

Archive powered by MHonArc 2.6.16.

§