The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
Single fact and full facter run can produce different results for the same fact.
|Keywords:||Affected Facter version:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
The way that facter loads a single fact vs all facts causes discrepancies if the same fact is defined twice (it’s possible defining a fact twice should be considered an error). In this simple example, there are two facts in lib/facter, bar.rb and foo.rb.
The single fact looks for $factname.rb in the facter path and returns the first it finds, while the facter run will load all facts in a sorted order, and load the first fact in that sort.
Facter.add('foo') do setcode do "foo bar" end end
Facter.add('foo') do setcode do "bar foo" end end
root@deb6-64:~# facter foo bar foo root@deb6-64:~# facter -p | grep foo foo => foo bar