Red Hat Bugzilla – Bug 1463686
Smartclass parameters does not allow for multiple data types
Last modified: 2017-09-28 02:27:42 EDT
- Description of problem:
The elastic.co elasticsearch puppet class accepts multiple datatypes for the $version parameter.
The parameter defaults to the boolean value False, but can also be set to a version number in String format. The Smart class parameters Parameters details UI does not handle this case. You are forced to choose on or the other.
Choose boolean and you can't enter a version number.
Choose string and Puppet will return an error because "False" is not a Boolean.
Link to puppet class code:
A work around is to choose string and always specify a version number (which is probably the best practice anyways), but this forces the user to choose a version.
- Actual results:
The Elasticsearch Puppet class $version parameter accepts both a Boolean (the default value) or a String representing the version to install, but the Satellite UI only allows you to pick one datatype. This means I'm forced to specify a version number everywhere. I cannot specify a version in one host group and leave the default setting in another because the data type validation will fail at either the Satellite or Puppet level.
The smart class Boolean accept True/False/value
Why not use the "Use Puppet default" option?
The $version parameter should be string and in cases where you need to go back to the default check the "Use Puppet default" checkbox.
This will avoid sending anything to puppet in a specific case.
You can add a matcher hostgroup=EXAMPLE and check the "Use Puppet default" for that matcher and then all hosts that have that hostgroup EXAMPLE will not sent the value of version unless you add a matcher of a higher priority for them.
Closing based on Comment 7.
Comment 3 provides the workflow with "Use Puppet default" option.