-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Puppet 8 for DevOps Engineers
By :

This chapter will cover how Puppet handles variables and, in particular, how Puppet differs from most declarative languages in terms of how they are used and declared. We will look at the core data types that are used to define what the value of a variable can contain and how it can be interacted with. Then, we will look at how data types and variables allow the classes we discussed in Chapter 3 to receive external data and handle default values.
Arrays and hashes will be discussed in detail, including how to declare them, access values, and manipulate them with operations. The Sensitive
data type will be shown, which you can use to secure values in logs and reports while making the limitations of this data type and what it does not secure clear. We will also cover abstract data types and show you how to allow more complex and flexible definitions of variables and values. The chapter will finish by covering how variable scopes and namespaces work with variables...