Method: Puppet.initialize_facts
- Defined in:
- lib/puppet.rb
.initialize_facts ⇒ Object
Initialize puppet’s core facts. It should not be called before initialize_settings.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/puppet.rb', line 189 def self.initialize_facts # Add the puppetversion fact; this is done before generating the hash so it is # accessible to custom facts. Puppet.runtime[:facter].add(:puppetversion) do setcode { Puppet.version.to_s } end Puppet.runtime[:facter].add(:agent_specified_environment) do setcode do Puppet.settings.set_by_cli(:environment) || Puppet.settings.set_in_section(:environment, :agent) || Puppet.settings.set_in_section(:environment, :main) end end end |