Chapter 5. Variables, expressions, and facts

It is impossible to begin to learn that which one thinks one already knows.

—Epictetus

In this chapter, you will learn about Puppet variables and data types, expressions, and conditional statements. You will also learn how Puppet manifests can get data about the node using Facter, find out which are the most important standard facts, and see how to create your own external facts. Finally, you will use Puppet's each function to iterate over arrays and hashes, including Facter data.

Variables, expressions, and facts

Introducing variables

A variable in Puppet is simply a way of giving a name to a particular value, which we can then use wherever ...

Get Puppet 4.10 Beginner's Guide Second Edition 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.