The Puppet Labs Issue Tracker has Moved:

Bug #15353

Single fact and full facter run can produce different results for the same fact.

Added by Matthaus Owens over 2 years ago. Updated about 2 years ago.

Status:AcceptedStart date:07/03/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Keywords: Affected Facter version:

We've Moved!

Ticket tracking is now hosted in JIRA:

This ticket may be automatically exported to the FACT project on JIRA using the button below:


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"


Facter.add('foo') do
  setcode do
    "bar foo"
root@deb6-64:~# facter foo
bar foo
root@deb6-64:~# facter -p | grep foo
foo => foo bar


#1 Updated by Matthaus Owens over 2 years ago

  • Description updated (diff)

#2 Updated by Anonymous over 2 years ago

  • Status changed from Unreviewed to Investigating

#3 Updated by Anonymous about 2 years ago

  • Status changed from Investigating to Accepted

Also available in: Atom PDF