The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #15353

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

Added by Matthaus Owens almost 4 years ago. Updated over 3 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:


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 almost 4 years ago

  • Description updated (diff)

#2 Updated by Anonymous almost 4 years ago

  • Status changed from Unreviewed to Investigating

#3 Updated by Anonymous over 3 years ago

  • Status changed from Investigating to Accepted

Also available in: Atom PDF