When facts were introduced in Chapter 3, A Peek into the Ruby Part of Puppet - Facts, Types, and Providers, you got a small tour of the process of creating your own custom facts.
We hinted at modules at that point, and now, we can take a closer look at how the fact code is deployed, using the example of the Cacti module. Let's focus on native Ruby facts - they are more portable than the external facts. As the latter are easy to create, there is no need to discuss them in depth here.
For details on external facts, you can refer to the online documentation on custom facts on the Puppet Labs site at http://docs.puppetlabs.com/facter/latest/custom_facts.html#external-facts.
Facts are part of the Puppet plugins that a module can contain, just as the types and providers from the previous sections. They belong in the lib/facter...