Package facter

Command and ruby library for gathering system information

https://puppetlabs.com/facter

Facter is a lightweight program that gathers basic node information about the
hardware and operating system. Facter is especially useful for retrieving
things like operating system names, hardware characteristics, IP addresses, MAC
addresses, and SSH keys.

Facter is extensible and allows gathering of node information that may be
custom or site specific. It is easy to extend by including your own custom
facts. Facter can also be used to create conditional expressions in Puppet that
key off the values returned by facts.

System Administration (Section 8)
facter
Collect and display facts about the current system. The library behind Facter is easy to expand, making Facter an easy way to collect information about a system...