Task metadata types
Task metadata can accept most Puppet data types.
Some Puppet types can not be represented as
JSON, such as
Hash[Integer, String]
, Object
, or Resource
. Do
not use these in tasks, because they can never be matched.Type | Description |
---|---|
String
|
Accepts any string. |
String[1]
|
Accepts any non-empty string, which is a string at least one character in length. |
Enum[choice1, choice2]
|
Accepts one of the listed choices. |
Pattern[/\A\w+\Z/]
|
Accepts strings matching the regex /\w+/ or non-empty strings of word characters. |
Integer
|
Accepts integer values. JSON has no integer type, so this can vary depending on input. |
Optional[String[1]]
|
This type designates the parameter as optional and permits
null values. Tasks have no
required nullable values. |
Array[String]
|
Matches an array of strings. |
Hash
|
Matches a JSON object. |
Variant[Integer,
Pattern[/\A\d+\Z/]]
|
Matches an integer or a string of an integer |
Boolean
|
Accepts Boolean values. |