Class: Nucleon::Plugin::CloudActionWrapper
- Inherits:
-
Object
- Object
- Nucleon::Plugin::CloudActionWrapper
- Defined in:
- lib/core/plugin/cloud_action_wrapper.rb
Instance Method Summary collapse
-
#execute(use_network = true, &block) ⇒ Object
—————————————————————————– Operations.
Instance Method Details
#execute(use_network = true, &block) ⇒ Object
Operations
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/core/plugin/cloud_action_wrapper.rb', line 13 def execute(use_network = true, &block) super do |node| bin_dir = File.join(network.directory, 'bin') bin_dir = ( File.directory?(bin_dir) ? bin_dir : network.directory ) Dir.chdir(bin_dir) do result = node.exec({ :commands => [ block.call(node) ] }).first myself.status = result.status end end end |