Class: Sprinkle::Actors::Ssh
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #gateway(gateway) ⇒ Object
-
#initialize(options = {}, &block) ⇒ Ssh
constructor
:nodoc:.
- #process(name, commands, roles, suppress_and_return_failures = false) ⇒ Object
- #roles(roles) ⇒ Object
- #user(user) ⇒ Object
Constructor Details
#initialize(options = {}, &block) ⇒ Ssh
:nodoc:
8 9 10 11 |
# File 'lib/sprinkle/actors/ssh.rb', line 8 def initialize( = {}, &block) #:nodoc: @options = .update(:user => 'root') self.instance_eval &block if block end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/sprinkle/actors/ssh.rb', line 6 def @options end |
Instance Method Details
#gateway(gateway) ⇒ Object
17 18 19 |
# File 'lib/sprinkle/actors/ssh.rb', line 17 def gateway(gateway) @options[:gateway] = gateway end |
#process(name, commands, roles, suppress_and_return_failures = false) ⇒ Object
25 26 27 28 |
# File 'lib/sprinkle/actors/ssh.rb', line 25 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) end |
#roles(roles) ⇒ Object
13 14 15 |
# File 'lib/sprinkle/actors/ssh.rb', line 13 def roles(roles) @options[:roles] = roles end |
#user(user) ⇒ Object
21 22 23 |
# File 'lib/sprinkle/actors/ssh.rb', line 21 def user(user) @options[:user] = user end |