Removed support for OpenBSD < 4.9

This commit is contained in:
Ossi Salmi 2013-05-04 16:33:46 +03:00
parent 93906963d9
commit e8b2422265
7 changed files with 55 additions and 223 deletions

View file

@ -9,26 +9,12 @@ class munin::node {
service { "munin-node":
name => $::operatingsystem ? {
OpenBSD => $::operatingsystemrelease ? {
/4\.[1-8]/ => "munin-node",
default => "munin_node",
},
default => "munin-node",
"openbsd" => "munin_node",
default => "munin-node",
},
ensure => running,
enable => true,
require => Package["munin-node"],
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 ? {
OpenBSD => "/usr/bin/pkill -f /usr/local/sbin/munin-node",
default => undef,
},
}
file { "/etc/munin/munin-node.conf":
@ -56,7 +42,7 @@ class munin::node {
exec { "munin-node-configure":
command => "munin-node-configure --shell --remove-also 2>/dev/null | /bin/sh",
path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
user => root,
user => "root",
refreshonly => true,
notify => Service["munin-node"],
}
@ -99,10 +85,10 @@ define munin::snmpnode($snmp_community="public", $snmp_version="2") {
file { "/etc/munin/plugin-conf.d/snmp_${name}":
ensure => present,
content => "[snmp_${name}_*]\nenv.community ${snmp_community}\nenv.version ${snmp_version}\n",
owner => root,
owner => "root",
group => $::operatingsystem ? {
OpenBSD => wheel,
default => root,
"openbsd" => "wheel",
default => "root",
},
mode => "0600",
notify => Service["munin-node"],
@ -165,14 +151,14 @@ define munin::plugin($config = "") {
"puppet:///modules/munin/plugin-conf/${config}", ],
owner => "root",
group => $::operatingsystem ? {
OpenBSD => wheel,
default => root,
"openbsd" => "wheel",
default => "root",
},
mode => "0644",
notify => Service["munin-node"],
require => $::operatingsystem ? {
OpenBSD => File["/usr/local/libexec/munin/plugins/${name}"],
default => File["/usr/share/munin/plugins/${name}"],
"openbsd" => File["/usr/local/libexec/munin/plugins/${name}"],
default => File["/usr/share/munin/plugins/${name}"],
},
}
}
@ -182,7 +168,7 @@ define munin::plugin($config = "") {
exec { "munin-enable-${name}":
command => "ln -s /usr/local/libexec/munin/plugins/${name} /etc/munin/plugins/${name}",
path => "/bin:/usr/bin:/sbin:/usr/sbin",
user => root,
user => "root",
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
"/usr/local/libexec/munin/plugins/${name} autoconf", ],
notify => Service["munin-node"],
@ -193,7 +179,7 @@ define munin::plugin($config = "") {
exec { "munin-enable-${name}":
command => "ln -s /usr/share/munin/plugins/${name} /etc/munin/plugins/${name}",
path => "/bin:/usr/bin:/sbin:/usr/sbin",
user => root,
user => "root",
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
"/usr/share/munin/plugins/${name} autoconf", ],
notify => Service["munin-node"],