Sha256: f7d66c7a97b7136de144f67bf9e86ba325eff2cc9b342864f2df602d452bf5ee
Contents?: true
Size: 899 Bytes
Versions: 14
Compression:
Stored size: 899 Bytes
Contents
module CORL module Action class Exec < Plugin::CloudAction #---------------------------------------------------------------------------- # Settings def configure super do register :command, :array, nil end end #--- def arguments [ :command ] end #----------------------------------------------------------------------------- # Operations def execute super do |node, network| ensure_node(node) do if settings[:command].length > 1 settings[:command].collect! do |value| if value.strip.match(/\s+/) value = "\"#{value}\"" end value end end command_str = settings[:command].join(' ') result = node.exec({ :commands => [ command_str ] }).first myself.status = result.status end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems