thias / puppet-sysctl

Puppet module to manage sysctl parameters
Other
35 stars 86 forks source link

Check the runtime value of the sysctl variables #23

Closed jjneely closed 8 years ago

jjneely commented 9 years ago

If the current runtime values for the sysctl variables do not match what we are putting in the sysctl.d/ files, then set the sysctl variable as well. This will correct drift that occurs for whatever reason.

jjneely commented 9 years ago

I've updated this PR to include updating tests, and adding better shell quoting.

thias commented 9 years ago

More than 'check', this would be 'enforce', right? It's interesting and worth being added.

But uppercase in variable names are not permitted (and break with puppet 3's future parser and with puppet 4). Could you please resubmit the change with that fixed and maybe the name also changed from 'check' to 'enforce' for the sake of clarity?

jjneely commented 9 years ago

I've updated the name of the Exec and lower cased the variable names. Although, my understanding of the Puppet 4 deprecations was that variables that start with a upper case letter would not be permitted rather than a variable name containing. Perhaps I missed something?

thias commented 8 years ago

Sorry for having taken so long : I have re-implemented this in f387bb6f6d6b20a433f74aebd243d327d4cade29 as I have also made it possible to optionally disable it (the $enforce => true parameter), and there were a couple of cosmetic nipicks of mine (double quotes in the tests, variable used only once).

Thank you VERY much for this nice addition!!