Closed brigriffin closed 4 years ago
That is correct... Here we added a workaround, but it would be nice to see the logic directly into the module:
case $::lsbdistcodename {
'stretch': {
augeas { 'systemd-snmpd-conf':
context => '/files/lib/systemd/system/snmpd.service/Service/ExecStart',
changes => [
'set arguments/1 -LS2d',
],
require => Package['snmpd'],
notify => [ Exec['systemd-reload'], Service['snmpd'], ],
}
exec { 'systemd-reload':
command => '/bin/systemctl daemon-reload',
refreshonly => true,
}
}
default: { }
}
With the exec due to systemd being unable to read system conf files directly, as it seems.
Hi,
I have the same issue. @bastelfreak is there any work in progress on this issue ?
Maybe the fastest way to fix this is to provide for debian 9 a template for /lib/systemd/system/snmpd.service
?
@hdep can you provide a patch for this? Also the preferred way custom systemd unit files is /etc/systemd/system/
and not /lib/systemd/system
.
Since this module is declared Debian9 compatible and with acceptance tests, they should fail. But they pass.
@hep with your patch can you update acceptance tests to tackle this issue ?
@bastelfreak on debian 9 the file in /etc/systemd is a link to /lib/systemd
$ ls -al /etc/systemd/system/multi-user.target.wants/snmpd.service
lrwxrwxrwx 1 root root 33 janv. 4 10:02 /etc/systemd/system/multi-user.target.wants/snmpd.service -> /lib/systemd/system/snmpd.service
So I can't do that
I give up because I think fixing rpsec should have been done in another PR. if anyone can fix the bug this will be great.
bug still present in 5.0.0
fixed in #216
The
snmpd_options
parameter of this module does not work anymore with Debian 9 (stretch). It looks like modifying theSNMPDOPTS
environment variable directly in the/etc/defaults/snmpd
file as does this module actually do is not taken in account anymore. Since Debian 9 uses systemd, the default SNMP daemon options are set in/lib/systemd/system/snmpd.service
(in theExecStart
parameter). So starting from Debian 9 I think this module needs to use the systemd way in order to customise snmpd's options.