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 could then use ...

Get Puppet 5 Beginner's Guide - Third 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.