Module: Assemblr::Remote::Group
- Defined in:
- lib/assemblr/remote.rb
Overview
Defines methods availabile only while in a group block.
Class Method Summary collapse
- .remote_exec(cmd, inject: []) ⇒ Object
- .remote_upload(src, dest, recursive: false, timeout: 5) ⇒ Object
Class Method Details
.remote_exec(cmd, inject: []) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/assemblr/remote.rb', line 39 def self.remote_exec(cmd, inject: []) results = [] Remote.current_nodes.each do |n| result = Remote.remote_exec(n[:ip], n[:user], cmd, inject: inject) results << result end results end |
.remote_upload(src, dest, recursive: false, timeout: 5) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/assemblr/remote.rb', line 31 def self.remote_upload(src, dest, recursive: false, timeout: 5) Remote.current_nodes.each do |n| Remote.upload(n[:ip], n[:user], src, dest, recursive: recursive, timeout: timeout) end end |