-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of type *property* defaults and use of Puppet::Property::Boolean #240
Comments
@alexjfisher looks like there is an overarching issue with boolean properties in resource types: https://tickets.puppetlabs.com/browse/PUP-2368 Based on @DavidS's comment at the end of the ticket, this issue affects even the new Resource API. |
@dhollinger Correct. I've bumped into this in a few other modules. Shame about the resource API. I think after his talk at FOSDEM, David told me booleans properties were fixed in the new API. I guess not though. |
Writing boolean properties, yes. Can't do much about core puppet being a jerk, though. That's @joshcooper's sisyphus. |
Is it |
Is this why I see with: network_config{ 'ifcfg-enp5s0f0':
ensure => "present",
onboot => true,
family => "inet",
method => "static",
ipaddress => "138.137.160.71",
netmask => "255.255.255.224",
options => {
"GATEWAY" => "138.137.160.65",
"USERCTL" => "false"
},
} I get the error:
when there is no Property is defined as :
Not possible to produce the error with a trivial puppet manifest and puppet apply - only a full puppet run. |
We get the same for
|
trevor.viljoen reported this issue on slack
The problem is that we use defaults for properties. Defaults are ok for parameters, but not so much for properties. Sometimes a default is needed for resource creation, but this code can go in the provider create method instead.
Worse still are the properties that default to true and use Puppet::Property::Boolean. Puppet::Property::Boolean is completely broken. If you try and set any of those properties to false, nothing will happen.
The text was updated successfully, but these errors were encountered: