| This came up when we wanted to have an interpolated integer as a default value for a setting. Currently it is not possible to do this, as the interpolation has to be wrapped in quotes, so the setting becomes a string instead. Puppet has various setting types (array, boolean, enum, ttl, priority, etc.) which can have their own munge logic. We should create a numeric (or integer) setting type which converts passed values to valid numbers (even if they are passed as strings/symbols). On top of this, we should have a port setting type which inherits from the numeric setting type. In short, it should call munge on its superclass and then check if the resulting number is valid (between 0 and 65535). All port-related settings should be updated afterwards to use the new type (masterport, serverport, ca_port and report_port). POC for this functionality (without the numeric setting type): https://github.com/puppetlabs/puppet/pull/8373 This is considered breaking in a way, as there isn't a consensus on whether the port-related settings should be strings or integers (currently both are accepted). |