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 - Puppet Tutorial
From the course: Puppet Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Resources5m 41s
-
(Locked)
Classes5m 23s
-
(Locked)
The node graph4m 36s
-
(Locked)
Generate a node graph2m 50s
-
(Locked)
Defined resource types1m 51s
-
(Locked)
Variables and conditionals5m 29s
-
(Locked)
Iteration2m 17s
-
(Locked)
Facts and functions4m 18s
-
(Locked)
More resources2m 54s
-
(Locked)
✓ Challenge: Simplify a manifest21s
-
(Locked)
✓ Solution: Simplify a manifest1m 13s
-
-
-
-
-
-
-