From the course: Puppet Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Facts and functions

Facts and functions - Puppet Tutorial

From the course: Puppet Essential Training

Start my 1-month free trial

Facts and functions

- When puppet runs on a node, it first gathers a lot of information about the system using a program called facter. That's facter with an E-R. If you have puppet installed somewhere, you can actually run facter directly yourself. It'll give you a lot of information about your system. Details about your operating system version, your processors, drives, et cetera. To see these facts on the forum that they're available to puppet, use the puppet facts command instead. This returns a structured hash of facts. Originally, facter facts were just a flat list of values. For example, to get the 16 part of an Ubuntu version 1604 system, the fact name is operating system maj release. The two colons at the beginning are optional, but they help avoid confusion with a local variable of the same name. As you might've guessed, this led to a lot of frustrating typos. Puppet is now able to use structured data instead. So the same fact can now be accessed by using the built in facts hash. There are a…

Contents