Added support for RHEL and did some syntax cleaning
Assume that "RedHat" also works where "CentOS" does.
This commit is contained in:
parent
e9aae1dcf6
commit
24ecb51f6f
63 changed files with 544 additions and 497 deletions
|
@ -8,8 +8,8 @@ class munin::node {
|
|||
}
|
||||
|
||||
service { "munin-node":
|
||||
name => $operatingsystem ? {
|
||||
OpenBSD => $operatingsystemrelease ? {
|
||||
name => $::operatingsystem ? {
|
||||
OpenBSD => $::operatingsystemrelease ? {
|
||||
/4\.[1-8]/ => "munin-node",
|
||||
default => "munin_node",
|
||||
},
|
||||
|
@ -18,14 +18,14 @@ class munin::node {
|
|||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["munin-node"],
|
||||
start => $operatingsystem ? {
|
||||
OpenBSD => $operatingsystemrelease ? {
|
||||
start => $::operatingsystem ? {
|
||||
OpenBSD => $::operatingsystemrelease ? {
|
||||
/4\.[1-8]/ => "/usr/bin/install -d -o _munin /var/run/munin; /usr/local/sbin/munin-node",
|
||||
default => undef,
|
||||
},
|
||||
default => undef,
|
||||
},
|
||||
stop => $operatingsystem ? {
|
||||
stop => $::operatingsystem ? {
|
||||
OpenBSD => "/usr/bin/pkill -f /usr/local/sbin/munin-node",
|
||||
default => undef,
|
||||
},
|
||||
|
@ -35,7 +35,7 @@ class munin::node {
|
|||
ensure => present,
|
||||
content => template("munin/munin-node.conf.erb"),
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
group => $::operatingsystem ? {
|
||||
OpenBSD => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
|
@ -95,7 +95,7 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") {
|
|||
ensure => present,
|
||||
content => "[snmp_${name}_*]\nenv.community ${snmp_community}\nenv.version ${snmp_version}\n",
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
group => $::operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
|
@ -129,7 +129,7 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") {
|
|||
#
|
||||
define munin::plugin($config = "") {
|
||||
|
||||
case $operatingsystem {
|
||||
case $::operatingsystem {
|
||||
OpenBSD: {
|
||||
file { "/usr/local/libexec/munin/plugins/${name}":
|
||||
ensure => present,
|
||||
|
@ -159,20 +159,20 @@ define munin::plugin($config = "") {
|
|||
"puppet:///files/munin/plugin-conf/${config}",
|
||||
"puppet:///modules/munin/plugin-conf/${config}", ],
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
group => $::operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
mode => "0644",
|
||||
notify => Service["munin-node"],
|
||||
require => $operatingsystem ? {
|
||||
require => $::operatingsystem ? {
|
||||
OpenBSD => File["/usr/local/libexec/munin/plugins/${name}"],
|
||||
default => File["/usr/share/munin/plugins/${name}"],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
case $::operatingsystem {
|
||||
OpenBSD: {
|
||||
exec { "munin-enable-${name}":
|
||||
command => "ln -s /usr/local/libexec/munin/plugins/${name} /etc/munin/plugins/${name}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue