lib/bolt/executor.rb in bolt-0.16.0 vs lib/bolt/executor.rb in bolt-0.16.1
- old
+ new
@@ -26,11 +26,11 @@
@notifier = Bolt::Notifier.new
end
def from_targets(targets)
targets.map do |target|
- Bolt::Node.from_target(target, config: @config)
+ Bolt::Node.from_target(target)
end
end
private :from_targets
def on(nodes, callback = nil)
@@ -148,18 +148,18 @@
end
@logger.info(summary('task', task, r))
r
end
- def file_upload(targets, source, destination)
+ def file_upload(targets, source, destination, options = {})
nodes = from_targets(targets)
@logger.info("Starting file upload from #{source} to #{destination} on #{nodes.map(&:uri)}")
callback = block_given? ? Proc.new : nil
r = on(nodes, callback) do |node|
@logger.debug { "Uploading: '#{source}' to #{destination} on #{node.uri}" }
node_result = with_exception_handling(node) do
- node.upload(source, destination)
+ node.upload(source, destination, options)
end
@logger.debug("Result on #{node.uri}: #{JSON.dump(node_result.value)}")
node_result
end
@logger.info(summary('upload', source, r))