ajcrowe / puppet-supervisord

Puppet Module to install and configure applications under supervisord
MIT License
37 stars 104 forks source link

Test boolean options for nil in program conf templates #25

Closed rayl closed 10 years ago

rayl commented 10 years ago

The old behavior would elide the option from the file if the parm was explicitly set to false. This doesn't work if the default value of the parm is true (autostart, for example)

The new behavior properly distinguishes undef from false, and will insert an explicit 'option = false' into the program conf file.

For details, see:

https://docs.puppetlabs.com/guides/templating.html#testing-for-undefined-variables

Signed-off-by: Ray Lehtiniemi rayl@mail.com

ajcrowe commented 10 years ago

Thanks for the MR @rayl, I think this would probably need to be applied to all the core configuration files (eg: fcgi-program, group etc) would you be willing to do these templates as well?

rayl commented 10 years ago

Sure, i've updated the pull request with some (untested) updates for several other template variables.

ajcrowe commented 10 years ago

Great, I think I will have to review how I'm doing the param validation as well. I'm thinking if something is set to false it is bypassing the validation checking in the manifests.

Thanks for the changes, will have to review and test things.