Language: About values and data types
This version of Puppet is not included in Puppet Enterprise. The latest version of PE includes Puppet 4.9.
Values and data
Most of the things you can do with the Puppet language involve some form of data.
An individual piece of data is called a value, and every value has a data type, which determines what kind of information that value can contain and how you can interact with it.
Strings are the most common and useful data type, but you’ll also have to work with others, including numbers, arrays, and some Puppet-specific data types like resource references.
Puppet’s data types
- Regular Expressions
- Resource References
Literal data types as values
Although you’ll mostly interact with values of the various data types, Puppet also includes values like
String that represent data types.
You can use these special values to examine a piece of data or enforce rules. Most of the time, they act like patterns, similar to a regular expression: given a value and a data type, you can test whether the value matches the data type. (And then either adjust your code’s behavior accordingly, or raise an error if something has gone wrong.)
For the syntax and behavior of literal data types, see:
For info about each type’s behavior, see the main data type pages listed above. Each of these pages gives details about using that data type as a value.
For special abstract data types, which you can use to do more sophisticated or permissive type checking, see: