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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.