logo       

Giving an input_query a response: msg#00119

lang.ruby.capistrano.general

Subject: Giving an input_query a response


I wanted to provide a password for a new user account for each
machine, so I wanted to send the password as a response to "Enter new
UNIX password" etc.

Here are some variations of the actor_extension.rb methods (e.g.
sudo_with_input) that I wrote.

I used them like:
sudo_with_input_and_response "passwd #{user}", /password/, password

Someone might like to add these to actor_extension.rb, or modify the
existing methods to allow an optional response argument (instead of
always prompting the user for a value/password).

Code here - http://pastie.caboo.se/119401




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise