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":
|
package { "net-snmp":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
"openbsd" => "net-snmp",
|
"openbsd" => "net-snmp",
|
||||||
default => "net-snmp-utils",
|
default => [ "net-snmp-utils", "net-snmp", ],
|
||||||
},
|
},
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,16 @@ class snmp::trapd($acl=NONE) {
|
||||||
realize([ User["snmptrapd"], Group["snmptrapd"], ])
|
realize([ User["snmptrapd"], Group["snmptrapd"], ])
|
||||||
|
|
||||||
case $::operatingsystem {
|
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": {
|
"openbsd": {
|
||||||
file { "/etc/rc.d/snmptrapd":
|
file { "/etc/rc.d/snmptrapd":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
Loading…
Add table
Reference in a new issue