puppetlabs / puppet-specifications

Specification of the Puppet Language, Catalog, Extension points
Other
99 stars 66 forks source link

Allow task parameters to have default values #145

Closed nicklewis closed 4 years ago

nicklewis commented 4 years ago

This adds a "default" key to the parameter specification to set a value that should be passed to the task if the parameter isn't provided. This value must satisfy the "type" of the parameter.

This should be backward-compatible so long as the task implementation is correctly written to match the parameter type specification. Specifically, task authors should understand that the "default" field is advisory to the task runner and should not assume that a parameter of type Optional will always have a value just because it has a "default" specified.

nicklewis commented 4 years ago

Updated to mention the task runner must respect default values