|
@@ -38,8 +38,8 @@ module AgentControllerConcern
|
|
end
|
|
end
|
|
|
|
|
|
def control!
|
|
def control!
|
|
- control_targets.each { |target|
|
|
|
|
- interpolate_with('target' => target) {
|
|
|
|
|
|
+ control_targets.each do |target|
|
|
|
|
+ interpolate_with('target' => target) do
|
|
begin
|
|
begin
|
|
case action = control_action
|
|
case action = control_action
|
|
when 'run'
|
|
when 'run'
|
|
@@ -72,14 +72,14 @@ module AgentControllerConcern
|
|
target.update! options: target.options.deep_merge(interpolated['configure_options'])
|
|
target.update! options: target.options.deep_merge(interpolated['configure_options'])
|
|
log "Agent '#{target.name}' is configured with #{interpolated['configure_options'].inspect}"
|
|
log "Agent '#{target.name}' is configured with #{interpolated['configure_options'].inspect}"
|
|
when ''
|
|
when ''
|
|
- # Do nothing
|
|
|
|
|
|
+ # Do nothing
|
|
else
|
|
else
|
|
error "Unsupported action '#{action}' ignored for '#{target.name}'"
|
|
error "Unsupported action '#{action}' ignored for '#{target.name}'"
|
|
end
|
|
end
|
|
rescue => e
|
|
rescue => e
|
|
error "Failed to #{action} '#{target.name}': #{e.message}"
|
|
error "Failed to #{action} '#{target.name}': #{e.message}"
|
|
end
|
|
end
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ end
|
|
|
|
+ end
|
|
end
|
|
end
|
|
end
|
|
end
|