Chapter 8. Expressions and Logic
A young man should read five hours in a day, and so may acquire a great deal of knowledge.
— Samuel Johnson
In this chapter, you'll learn how to make choices in your Puppet manifests, how to do arithmetic, logic, and string operations in the Puppet language, and how to use regular expressions to match patterns in strings. You'll also find out about some useful Puppet data types: arrays and hashes.
It's useful to be able to do different things in a manifest depending on the value of some variable or expression. Puppet provides several ways to do this. The first is the