lib/puppet/transaction.rb
# Invoke the pre_run_check hook in every resource in the catalog.
# This should (only) be called by Transaction#evaluate before applying
# the catalog.
#
# @see Puppet::Transaction#evaluate
# @see Puppet::Type#pre_run_check
# @raise [Puppet::Error] If any pre-run checks failed.
# @return [void]
Invoke the pre_run_check hook in every resource in the catalog.
This should (only) be called by Transaction#evaluate before applying
the catalog.
Invoke the pre_run_check hook in every resource in the catalog . This should ( only ) be called by Transaction#evaluate before applying the catalog .
def perform_pre_run_checks
    prerun_errors = {}
    @catalog.vertices.each do |res|
      begin
        res.pre_run_check
      rescue Puppet::Error => detail
        prerun_errors[res] = detail
      end
    end
    unless prerun_errors.empty?
      prerun_errors.each do |res, detail|
        res.log_exception(detail)
      end
      raise Puppet::Error, "Some pre-run checks failed"
    end
  end
def perform_pre_run_checks prerun_errors = { } @catalog . vertices . each do | res | begin res . pre_run_check rescue Puppet :: Error => detail prerun_errors [ res ] = detail end end unless prerun_errors . empty? prerun_errors . each do | res , detail | res . log_exception ( detail ) end raise Puppet :: Error , "Some pre-run checks failed" end end
Invoke the pre_run_check hook in every resource in the catalog.
Invoke the pre_run_check hook in every resource in the catalog .
None
void
[Puppet::Error] If any pre-run checks failed.
[ Puppet :: Error ] If any pre - run checks failed .
see
None
see
None