bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb in bolt-1.19.0 vs bolt-modules/boltlib/lib/puppet/functions/apply_prep.rb in bolt-1.20.0
- old
+ new
@@ -44,18 +44,12 @@
unless Puppet[:tasks]
raise Puppet::ParseErrorWithIssue
.from_issue_and_stack(Bolt::PAL::Issues::PLAN_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, action: 'apply_prep')
end
- applicator = Puppet.lookup(:apply_executor) { nil }
- executor = Puppet.lookup(:bolt_executor) { nil }
- inventory = Puppet.lookup(:bolt_inventory) { nil }
-
- unless applicator && executor && inventory && Puppet.features.bolt?
- raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
- Puppet::Pops::Issues::TASK_MISSING_BOLT, action: _('apply_prep')
- )
- end
+ applicator = Puppet.lookup(:apply_executor)
+ executor = Puppet.lookup(:bolt_executor)
+ inventory = Puppet.lookup(:bolt_inventory)
executor.report_function_call('apply_prep')
targets = inventory.get_targets(target_spec)