Skip to content

Commit

Permalink
Passwork option for SSH
Browse files Browse the repository at this point in the history
  • Loading branch information
msofaer committed Aug 6, 2009
1 parent 9bd05b1 commit cd96d98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/sprinkle/actors/ssh.rb
Expand Up @@ -21,7 +21,11 @@ def gateway(gateway)
def user(user)
@options[:user] = user
end


def password(password)
@options[:password] = password
end

def process(name, commands, roles, suppress_and_return_failures = false)
return process_with_gateway(name, commands, roles) if gateway_defined?
process_direct(name, commands, roles)
Expand Down Expand Up @@ -50,7 +54,7 @@ def execute_on_host(commands, host, gateway = nil)
execute_on_connection(commands, ssh)
end
else # direct SSH connection
Net::SSH.start(host, @options[:user]) do |ssh|
Net::SSH.start(host, @options[:user], :password => options[:password]) do |ssh|
execute_on_connection(commands, ssh)
end
end
Expand Down

0 comments on commit cd96d98

Please sign in to comment.