-
- Downloads
Forbid not giving $config param to named_vhost.
THIS IS NOT A BACKWARDS-COMPATIBLE CHANGE! USERS MAY NEED TO CHANGE THEIR MANIFESTS WHEN UPGRADING! Previously, we had actually allowed users to not specify any config for apache::named_vhost. The reason for having a default value for the config parameter was, as far as I can remember, so users could specify ensure => absent and not have to specify the config parameter. But in practice it worked, because the string value of nil in Ruby (i.e, ``nil.to_s'') is the empty string, and nil is used to represent the Puppet value ``undef''. The previous commit broke that, and you would then get the error message "undefined method `split' for nil:NilClass" when Puppet tried to evaluate the named_vhost.conf.erb template. Without telling which apache::named_vhost resource that was causing it. I think it is better to force users to be explicit, so they have to specify "config => []" if they want to have an empty <VirtualHost> declaration. And to get a message that tells them explicitly what the error is if they don't. So add a check to apache::named_vhost that catches this. As mentioned above, this is not a backwards-compatible change. Users who relied on not specifying the 'config' parameter, must change their manifests to specify it as the empty string or the empty list. But at least it is not a silent change; users will get an error message saying what is wrong.
Loading
Please register or sign in to comment