modules/boltlib/lib/puppet/functions/run_task.rb in bolt-0.15.0 vs modules/boltlib/lib/puppet/functions/run_task.rb in bolt-0.16.0

- old
+ new

@@ -85,9 +85,10 @@ targets = targets.flatten.map { |t| t.is_a?(String) ? Bolt::Target.from_uri(t) : t } if targets.empty? Bolt::ResultSet.new([]) else # TODO: pass entire task to executor - executor.run_task(targets, task.executable, task.input_method, use_args, &block) + options = task_args.select { |k, _| k == '_run_as' } + executor.run_task(targets, task.executable, task.input_method, use_args, options, &block) end end end