Feature #24419
closedpuppet class - parse and honour puppet 5 variable definitions
Description
in line for puppet 5 module development standards/best practices the definition of variable data type should be included when defining variables inside init.pp.
eg:
class example (
Boolean $example_param = true,
Integer $example_option,
String $example_warn_message,
Boolean $example_enable,
String $example_username,
) {}
Currently foreman attempts to evaluate the data type based on the content, and assigns undef variables to "string"
This can cause problems with a differing variable data type being presented than the module is expecting, even though the variable data is sane. This is easy to overcome and an edge case by setting the variable type within the foreman interface, however as this appears to be the standard format for puppet 5 and for what I've read of puppet 6 development, it seems worthwhile looking at if Foreman should attempt to parse the data type from the module, rather than attempt to work it out.
Updated by Marek Hulán over 6 years ago
- Status changed from New to Duplicate
thanks for updating, this is a duplicate of #18553, closing
Updated by Marek Hulán over 6 years ago
- Related to Feature #18553: Set Puppet 4/5 data types during class import added