Ask Your Question
0

What is the Facter resolution order?

asked 2015-08-10 17:02:46 -0500

gpandzik gravatar image

There are numerous ways to set a Facter fact. What is the precedence order in which they are resolved -- i.e., what can override what?

Simply, what are the order-numbers in the blanks below?:

  • __ /etc/puppetlabs/facter/facts.d/*
  • __ /path/to/modules/mymodule/lib/facter/fact.rb
  • __ Hiera
  • _ FACTER* Environment variables
  • __ Puppet-set internal facts
  • __ ... any others I've forgotten

For reference, we're using PE 3.8.1 w/ Facter 2.4.

I've looked through the doc, and all I can find is that the environment variables will override Ruby-created facts under .../lib/facter/. Did I just miss a section, or is this not documented?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-11 05:07:34 -0500

facter --debug will show you what facter is doing and may help. it is possible to weight the value returned by a fact which gives it higher precedence (has_weight) good overview

from debug output I believe (but ready to stand corected!) ENV variables _ /etc/puppetlabs/facter/facts.d/* FACTERLIB ..

hopefully there should only be one resolution for a fact though - if not sorted out by confine or weighting I guess then theres a problem...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-10 17:02:46 -0500

Seen: 244 times

Last updated: Aug 11 '15