Custom facts and external facts
In this section, you will learn how to add to the facts provided by core via custom facts. These are written in Ruby, similar to core facts or external facts, which are either hard-rigged values or client-native executable scripts. While it can be tempting to gather everything, the extra burden facts put on the Puppet infrastructure, particularly with many agents, should be considered and balanced with the need for data.
External facts
External facts are executables that can set facts based on the logic within the scripts or facts set statically by the structured data of the file.
External facts can be stored in the following directories for Unix-based operating systems:
/
opt/puppetlabs/facter/facts.d/
/
etc/puppetlabs/facter/facts.d/
/
etc/facter/facts.d/
For Windows systems, they can be stored in C:\ProgramData\PuppetLabs\facter\facts.d\
.
In Chapter 8, you will learn how external facts can be distributed to clients...