Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (18 sloc) 0.717 kB
inMenu: true
directoryName: Custom Facts
Facter does everything it can to make adding custom facts easy. It will
autoload any files it finds in a ``facter/`` directory in its search
path, so you don't need to modify the package files. Also, Facter will
search through your environment for any variables whose names start with
'FACTER_' (case insensitive) and automatically add those facts.
As a simple example, here is how I publish my home directory to Puppet:
Facter.add("home") do
setcode do
I have ~/lib/ruby in my $RUBYLIB environment variable, so I just created
~/lib/ruby/facter and dropped the above code into a ``home.rb`` file
within that directory.
Jump to Line
Something went wrong with that request. Please try again.