Invert snmp group and owner logic; support > 18.04 by default and exempt out Debian 7 & 8 and Ubuntu 14 and 16. Comments or requests for amendments welcome.
Fixes #229
Add Ubuntu 20.04 Support
<!--
Thank you for contributing to this project!
-->
Suse 12 using systemd, not init for snmptrapd
Remove support for systems that still use one sysconfig file for both daemons.
Systemd support for debian systems.
Tests cleanup / reorder.
Reorder parameters
The current Debian stable package is using systemd, so /etc/default/snmpd was ignored. I've made some changes for rudimentry systemd support on Debian only.
In the process I realised that snmpd trap has probably not worked under Debian for a while (Debian moved it into snmptrapd). I can't see how to add it without messing with the code more extensively.
The systemd code also ignores @snmpdrun - it doesn't seem that /lib/systemd/system/snmpd.service has an appropriate place to put it.
On old versions of Debian this module also now failed due to not having $::operatingsystemmajrelease defined
Otherwise it does seem that this patch will install snmpd correctly on Debian 7.1 through to 9.3
Instead of allowing undef
, plain strings or arrays of strings, just
allow arrays of strings. Parameters that previously defaulted to undef
now default to empty arrays.
This allows us to simplify the templates and we no longer have
Optional
parameters that have default values set. (ro_community
defaulting to 'public'
but allowing undef
didn't make much sense
previously.)
View-based Access Control Model (VACM) is still recommended, but
traditional access control is no longer deprecated.
<!--
Thank you for contributing to this project!
-->
<!--
Replace this comment with a description of your pull request.
-->
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->