Added CentOS/RedHat support to snmp::trapd.
This commit is contained in:
parent
f1820c9c22
commit
139a8ed808
2 changed files with 13 additions and 1 deletions
2
snmp/files/snmptrapd.sysconfig
Normal file
2
snmp/files/snmptrapd.sysconfig
Normal file
|
@ -0,0 +1,2 @@
|
|||
# snmptrapd command line options
|
||||
OPTIONS="-n -u snmptrapd -g snmptrapd -c /etc/snmptrapd.conf"
|
|
@ -6,7 +6,7 @@ class snmp::utils {
|
|||
package { "net-snmp":
|
||||
name => $::operatingsystem ? {
|
||||
"openbsd" => "net-snmp",
|
||||
default => "net-snmp-utils",
|
||||
default => [ "net-snmp-utils", "net-snmp", ],
|
||||
},
|
||||
ensure => installed,
|
||||
}
|
||||
|
@ -35,6 +35,16 @@ class snmp::trapd($acl=NONE) {
|
|||
realize([ User["snmptrapd"], Group["snmptrapd"], ])
|
||||
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
file { "/etc/sysconfig/snmptrapd":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/snmp/snmptrapd.sysconfig",
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
notify => Service["snmptrapd"],
|
||||
}
|
||||
}
|
||||
"openbsd": {
|
||||
file { "/etc/rc.d/snmptrapd":
|
||||
ensure => present,
|
||||
|
|
Loading…
Add table
Reference in a new issue