lib/bolt/applicator.rb in bolt-2.1.0 vs lib/bolt/applicator.rb in bolt-2.2.0
- old
+ new
@@ -149,11 +149,11 @@
options = {}
if args.count > 1
type1 = Puppet.lookup(:pal_script_compiler).type('Hash[String, Data]')
Puppet::Pal.assert_type(type1, args[1], 'apply options')
- options = args[1].map { |k, v| [k.sub(/^_/, '').to_sym, v] }.to_h
+ options = args[1].transform_keys { |k| k.sub(/^_/, '').to_sym }
end
plan_vars = scope.to_hash(true, true)
%w[trusted server_facts facts].each { |k| plan_vars.delete(k) }
@@ -189,10 +189,10 @@
modulepath: @modulepath,
pdb_config: @pdb_client.config.to_hash,
hiera_config: @hiera_config,
plan_vars: plan_vars,
# This data isn't available on the target config hash
- config: @inventory.config.transport_data_get
+ config: @inventory.transport_data_get
}
description = options[:description] || 'apply catalog'
r = @executor.log_action(description, targets) do