Booleans are one-bit values, representing true or false.
The condition of an
statement expects an expression that resolves to a boolean value. All of Puppet's comparison operators resolve to boolean values, as do
The boolean data type has two possible
false. Literal booleans must be one of these two bare words (that is, not
in quotation marks).
Automatic conversion to boolean
undefvalue is converted to boolean
All other values are converted to boolean
Notably, this means the string values
zero-length string) and
"false" (in quotation
marks) both resolve to
To convert values to booleans with more permissive rules (for example,
false), use the
Boolean data type
The data type of boolean values is
It matches only the values
false, and accepts no parameters.
You can use abstract types to match values that might be boolean or might have
some other value. For example,
Variant[Boolean, Enum["true", "false"]] matches
stringified booleans as well as true booleans.