voxpupuli/puppet-logrotate

check debian support

Closed this issue · 2 comments

this module once listed debian 7 in the metadata.json. We removed it because it's EOL. We need to check if recent debian versions work and add them back.

I am using this module for Debian stretch and it is working well.

rj667 commented

We are using this module on Debian wheezy, jessie, stretch (about 450 machines in total).
That it works on wheezy, jessie and stretch is likely by accident, because the code in params.pp only checks $facts['operatingsystemmajrelease'] against '14.00' to set $default_su_user and $default_su_group to Ubuntu defaults, and Debian value for that fact happens to be lower.

On Debian buster (testing, the next stable) however the value for operatingsystemmajrelease is 'buster/sid' and the versioncmp() goes bust.

The PR replaces the test for operatingsystemmajrelease with one for operatingsystem which does the right thing on Ubuntu as well as Debian, regardless of version.