Class: Gaptool::RuncmdCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/gaptool-client.rb

Instance Method Summary collapse

Instance Method Details

#execute ⇒ Object



125
126
127
128
129
130
131
132
133
134
135
# File 'lib/gaptool-client.rb', line 125

def execute
  if !instance.nil?
    nodes = [$api.getonenode(instance)]
  else
    nodes = $api.getenvroles(role, environment)
  end
  nodes.peach do |node|
    commands = [ command.join(' ') ]
    sshcmd(node, commands)
  end
end