Is there a reference for the facts that are included in a default puppet installation?

For example, some examples I see include $operatingsystem which can be used to identify the distribution. Is there a reference of these somewhere?


As you probably know, these are all provided by the facter package. By running facter on the cli, you can see all of the facts it knows about:

architecture => i386
domain => <redacted>
facterversion => 1.3.8
fqdn => <redacted>
hardwareisa => unknown
hardwaremodel => i686
hostname => <redacted>
id => <redacted>
ipaddress => <redacted>
ipaddress_eth0 => <redacted>
kernel => Linux
kernelrelease => <redacted>
lsbdistcodename => hardy
lsbdistdescription => Ubuntu 8.04.4 LTS
lsbdistid => Ubuntu
lsbdistrelease => 8.04
macaddress => <redacted>
macaddress_eth0 => <redacted>
memoryfree => 336.51 MB
memorysize => 453.34 MB
operatingsystem => Debian
operatingsystemrelease => <redacted>
processor0 => Intel(R) Xeon(R) CPU           L5335  @ 2.00GHz
processor1 => Intel(R) Xeon(R) CPU           L5335  @ 2.00GHz
processor2 => Intel(R) Xeon(R) CPU           L5335  @ 2.00GHz
processor3 => Intel(R) Xeon(R) CPU           L5335  @ 2.00GHz
processorcount => 4
ps => ps -ef
rubysitedir => /usr/local/lib/site_ruby/1.8
rubyversion => 1.8.6
sshdsakey => <redacted>
sshrsakey => <redacted>
swapfree => 210.98 MB
swapsize => 256.00 MB
uniqueid => <redacted>
  • I beat you to it, but its the thought that counts ;-) – Kyle Brandt Jun 16 '11 at 19:11
  • Heh, thanks Kyle. Good luck with puppet. I'm just starting to cut my teeth with it as well. – EEAA Jun 16 '11 at 19:12
  • Ah, good excuse to build up QA on puppet, lets both post our questions :-) – Kyle Brandt Jun 16 '11 at 19:22

Oh just found that the easiest way is just to run facter from the command line. This outputs a list of the key values pairs:

root@ny-man01:/etc/puppet/files# facter
architecture => x86_64
domain => ny.stackoverflow.com
facterversion => 1.5.7
fqdn => ny-man01.ny.stackoverflow.com
hardwareisa => unknown
hardwaremodel => x86_64
hostname => ny-man01

Source: http://docs.puppetlabs.com/learning/variables.html


For Linux distributions you will also want to make sure you have the LSB Release information package installed. In Red Hat and Fedora distros this package is simply lsb-release

Without this package on Linux, the information provided by facter will be very spartan.


Some Facter facts are only available when facter is run as root:

$ diff <(facter) <(sudo facter)
> manufacturer => Supermicro
> productname => X8SIE
> serialnumber => 0123456789
> type => Sealed-case PC

In many cases, it's the facts that are derived from BIOS inspection with dmidecode and the like that are unable to be run as normal users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.