Reference of Built-In Puppet Facts
Solution 1:
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>
Solution 2:
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: https://puppet.com/docs/puppet/latest/lang_variables.html