[chef] Re: Re: simulate key press in a recipe


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: simulate key press in a recipe
  • Date: Thu, 5 Mar 2015 15:17:22 -0800

You can use the ruby PTY module, but it’s very tricky to do this in a 
reliable way. For example, these tests start chef-shell, wait for it to 
finish initializing and then exit. IO handling and timeout stuff is the vast 
majority of the code. 
https://github.com/chef/chef/blob/master/spec/functional/shell_spec.rb  ;

--  
Daniel DeLeo


On Thursday, March 5, 2015 at 3:08 PM, Vasiliy Tolstov wrote:

> 2015-03-06 2:06 GMT+03:00 Medya 
> <
>  
> (mailto: )>:
> > I know if you have to do that, it means something is wrong ! but for some
> > legacy application I really need to run a shell script wait a few seconds
> > and then
> > type something and hit "Enter"
> >  
> > is it possible in chef?
>  
>  
> use expect for this, or write in ruby needed logic inside recipe.
>  
> --  
> Vasiliy Tolstov,
> e-mail: 
> 
>  
> (mailto: )
> jabber: 
> 
>  
> (mailto: )






Archive powered by MHonArc 2.6.16.

§