Skip to content

Commit

Permalink
change logging to "LS6d" on Debian and Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
gittygoo authored and kenyon committed Dec 5, 2020
1 parent f631d94 commit 64c5aba
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions data/os/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ snmp::service_config: '/etc/snmp/snmpd.conf'
snmp::service_config_dir_group: 'root'
snmp::service_config_perms: '0600'
snmp::service_name: 'snmpd'
snmp::snmpd_options: "-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid"
snmp::snmptrapd_options: '-Lsd -p /var/run/snmptrapd.pid'
snmp::snmpd_options: "-LS6d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid"
snmp::snmptrapd_options: '-LS6d -p /var/run/snmptrapd.pid'
snmp::snmptrapd_package_name: 'snmptrapd'
snmp::sysconfig: '/etc/default/snmpd'
snmp::trap_service_config: '/etc/snmp/snmptrapd.conf'
Expand Down
2 changes: 1 addition & 1 deletion data/os/Debian/10.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
snmp::snmpd_options: "-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid"
snmp::snmpd_options: "-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid"
snmp::varnetsnmp_group: 'Debian-snmp'
snmp::varnetsnmp_owner: 'Debian-snmp'
2 changes: 1 addition & 1 deletion data/os/Debian/18.04.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
snmp::snmpd_options: "-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid"
snmp::snmpd_options: "-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid"
snmp::varnetsnmp_group: 'Debian-snmp'
snmp::varnetsnmp_owner: 'Debian-snmp'
2 changes: 1 addition & 1 deletion data/os/Debian/9.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
snmp::snmpd_options: "-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f"
snmp::snmpd_options: "-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f"
snmp::varnetsnmp_group: 'Debian-snmp'
snmp::varnetsnmp_owner: 'Debian-snmp'
20 changes: 10 additions & 10 deletions spec/classes/snmp_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -630,20 +630,20 @@
it { is_expected.not_to contain_file('snmptrapd.sysconfig') }
it { is_expected.not_to contain_service('snmptrapd') }
end
it 'contains File[snmpd.sysconfig] with contents "TRAPDOPTS=\'-Lsd -p /var/run/snmptrapd.pid\'"' do
it 'contains File[snmpd.sysconfig] with contents "TRAPDOPTS=\'-LS6d -p /var/run/snmptrapd.pid\'"' do
verify_contents(catalogue, 'snmpd.sysconfig', [
'TRAPDRUN=no',
'TRAPDOPTS=\'-Lsd -p /var/run/snmptrapd.pid\''
'TRAPDOPTS=\'-LS6d -p /var/run/snmptrapd.pid\''
])
end

case facts[:os]['release']['major']
when '9'
describe 'Debian-snmp as snmp user' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
verify_contents(catalogue, 'snmpd.sysconfig', [
'SNMPDRUN=yes',
'SNMPDOPTS=\'-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f\''
'SNMPDOPTS=\'-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f\''
])
end
it {
Expand All @@ -658,10 +658,10 @@
end
when '10'
describe 'Debian-snmp as snmp user' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
verify_contents(catalogue, 'snmpd.sysconfig', [
'SNMPDRUN=yes',
'SNMPDOPTS=\'-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid\''
'SNMPDOPTS=\'-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid\''
])
end
it {
Expand All @@ -676,10 +676,10 @@
end
when '18.04'
describe 'Debian-snmp as snmp user' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid""' do
verify_contents(catalogue, 'snmpd.sysconfig', [
'SNMPDRUN=yes',
'SNMPDOPTS=\'-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid\''
'SNMPDOPTS=\'-LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux -p /var/run/snmpd.pid\''
])
end
it {
Expand All @@ -694,10 +694,10 @@
end
else
describe 'snmp as snmp user' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid""' do
it 'contains File[snmpd.sysconfig] with contents "SNMPDOPTS="-LS6d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid""' do
verify_contents(catalogue, 'snmpd.sysconfig', [
'SNMPDRUN=yes',
'SNMPDOPTS=\'-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid\''
'SNMPDOPTS=\'-LS6d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid\''
])
end
it {
Expand Down

0 comments on commit 64c5aba

Please sign in to comment.