lib/puppet/parser/compiler.rb
# Iterate over collections and resources until we're sure that the whole
# compile is evaluated.  This is necessary because both collections
# and defined resources can generate new resources, which themselves could
# be defined resources.
Iterate over collections and resources until we're sure that the whole
compile is evaluated.  This is necessary because both collections
and defined resources can generate new resources, which themselves could
be defined resources.
Iterate over collections and resources until we ' re sure that the whole compile is evaluated . This is necessary because both collections and defined resources can generate new resources which themselves could be defined resources .
def evaluate_generators
    count = 0
    loop do
      done = true
      Puppet::Util::Profiler.profile("Iterated (#{count + 1}) on generators") do
        done = false if evaluate_collections
        done = false if evaluate_definitions
      end
      break if done
      count += 1
      if count > 1000
        raise Puppet::ParseError, "Somehow looped more than 1000 times while evaluating host catalog"
      end
    end
  end
def evaluate_generators count = 0 loop do done = true Puppet :: Util :: Profiler . profile ( "Iterated (#{count + 1}) on generators" ) do done = false if evaluate_collections done = false if evaluate_definitions end break if done count += 1 if count > 1000 raise Puppet :: ParseError , "Somehow looped more than 1000 times while evaluating host catalog" end end end
Iterate over collections and resources until we're sure that the whole
compile is evaluated.
Iterate over collections and resources until we ' re sure that the whole compile is evaluated .
# Call collections first, then definitions.