modules/boltlib/lib/puppet/functions/file_upload.rb in bolt-0.11.0 vs modules/boltlib/lib/puppet/functions/file_upload.rb in bolt-0.12.0
- old
+ new
@@ -37,18 +37,18 @@
Puppet::Pops::Issues::NO_SUCH_FILE_OR_DIRECTORY, file: source
)
end
# Ensure that that given targets are all Target instances
- targets = targets.flatten.map { |t| t.is_a?(String) ? Puppet::Pops::Types::TypeFactory.target.create(t) : t }
+ targets = targets.flatten.map { |t| t.is_a?(String) ? Bolt::Target.new(t) : t }
if targets.empty?
call_function('debug', "Simulating file upload of '#{found}' - no targets given - no action taken")
- Puppet::Pops::Types::ExecutionResult::EMPTY_RESULT
+ Bolt::ExecutionResult::EMPTY_RESULT
else
# Awaits change in the executor, enabling it receive Target instances
hosts = targets.map(&:host)
- Puppet::Pops::Types::ExecutionResult.from_bolt(
+ Bolt::ExecutionResult.from_bolt(
executor.file_upload(executor.from_uris(hosts), found, destination)
)
end
end
end