Project

General

Profile

Actions

Feature #24419

closed

puppet class - parse and honour puppet 5 variable definitions

Added by Matt Darcy over 5 years ago. Updated over 5 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
Puppet integration
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (1 open0 closed)

Related to Foreman - Feature #18553: Set Puppet 4/5 data types during class importNewActions
Actions #1

Updated by Tomer Brisker over 5 years ago

  • Category set to Puppet integration
Actions #2

Updated by Marek Hulán over 5 years ago

  • Status changed from New to Duplicate

thanks for updating, this is a duplicate of #18553, closing

Actions #3

Updated by Marek Hulán over 5 years ago

  • Related to Feature #18553: Set Puppet 4/5 data types during class import added
Actions

Also available in: Atom PDF