Language: Data Types: Undef
Included in Puppet Enterprise 2015.3. A newer version is available; see the version menu above for details.
undef value is roughly equivalent to
nil in Ruby; it represents the absence of a value. If the
strict_variables setting isn’t enabled, variables which have never been declared have a value of
undef value is usually useful for testing whether a variable has been set. It can also be used as the value of a resource attribute, which can let you un-set any value inherited from a resource default and cause the attribute to be unmanaged.
The only value in the undef data type is the bare word
When used as a boolean,
undef is false.
When interpolated into a string,
undef will be converted to the empty string.
Undef Data Type
The data type of
It matches only the value
undef, and takes no parameters.
Related Data Types
Several of the abstract data types will also match the value
undefin addition to several other data types.
Anytype matches any value, including
Optionaltype wraps one other data type, and returns a type that matches
undefin addition to that type.
Varianttype can accept the
Undeftype as a parameter, which will make the resulting data type match
NotUndeftype matches any value except