puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Allow specifying error_log severity for servers

Open ltning opened this issue 3 years ago • 4 comments

Fixes #1416

Note - same change may be needed in other template files.

ltning avatar Nov 09 '21 11:11 ltning

Could you add a test for this too? Seems like there's a similar one already here: https://github.com/voxpupuli/puppet-nginx/blob/master/spec/classes/nginx_spec.rb#L495

kenyon avatar Nov 09 '21 19:11 kenyon

I think I did it right; also added the same fix for non-TLS server entries. Since I'm not terribly familiar with this another set of eyes would be useful. Also uncertain why there's a failed test here..

ltning avatar Nov 09 '21 22:11 ltning

Right, now I think I see why it's failing the tests. My original patch used the top level error_log_severity; it did not introduce this as a setting for servers. Hence the tests are testing something that isn't actually there. What would you like me to do about this? I can try to add the parameters to the server defines, hoping I get that right..

ltning avatar Nov 09 '21 23:11 ltning

Yeah I think adding the severity as a class parameter to https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/server.pp is the way to go, similar to the parameters already there which are taking their value from the base class.

kenyon avatar Nov 09 '21 23:11 kenyon