Custom facts

Facts are the most comfortable kind of variables to work with:

  • They are at top scope, therefore easily accessible in every part of our code
  • They provide direct and trusted information, being executed on the client
  • They are computed: their values are set automatically and we don't have to manage them manually.

Out-of-the-box, depending on Facter version and the underlying OS, they give us:

  • Hardware information (architecture bios_* board* memory* processor virtual)
  • Operating system details (kernel* osfamily operatingsystem* lsb* sp_* selinux ssh* timezone uptime*)
  • Network configuration (hostname domain fqdn interfaces ipaddress_* macaddress_* network*)
  • Disks and filesystems (blockdevice_* filesystems swap*)
  • Puppet related software versions ( ...

Get Puppet: Mastering Infrastructure Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.