Class: Prepp::Target
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#options ⇒ Object
Returns the value of attribute options.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
4 5 6 |
# File 'lib/prepp/target.rb', line 4 def host @host end |
#options ⇒ Object
Returns the value of attribute options
4 5 6 |
# File 'lib/prepp/target.rb', line 4 def @options end |
#user ⇒ Object
Returns the value of attribute user
4 5 6 |
# File 'lib/prepp/target.rb', line 4 def user @user end |
Instance Method Details
#connection ⇒ Object
5 6 7 |
# File 'lib/prepp/target.rb', line 5 def connection @connection ||= Net::SSH.start(host, user, ) end |
#execute(commands) ⇒ Object
9 10 11 12 13 |
# File 'lib/prepp/target.rb', line 9 def execute(commands) commands.each do |cmd| cmd.results << connection.exec!(cmd.to_s) end end |