Class: Gaptool::RuncmdCommand

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

Instance Method Summary collapse

Instance Method Details

#executeObject



153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/gaptool-client.rb', line 153

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