1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[Glesys] Wrap ssh method to use rootpassword if present

This commit is contained in:
Simon Gate 2013-01-27 14:56:28 +01:00
parent c87b1016d8
commit 96e2fbe31a

View file

@ -99,6 +99,13 @@ module Fog
Fog::SSH.new(public_ip_address, username, credentials).run(commands)
end
def ssh(command, options={}, &block)
if options[:password].nil? && !rootpassword.nil?
options[:password] = rootpassword
end
super(command, options, &block)
end
def public_ip_address(options = {})
type = options[:type] || nil