summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-08 13:03:50 -0300
committermh <mh@immerda.ch>2012-06-08 13:03:50 -0300
commitb7228e65b66b72709f59709618a7c7be1ce795ef (patch)
treea013d49e7ff0fd9cdeeb61e64afc54dda092778f /manifests
parent9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 (diff)
refactor things for >2.7
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugin.pp19
1 files changed, 4 insertions, 15 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index fec7b6b..af8b44a 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -21,18 +21,12 @@ define munin::plugin (
file { $plugin: ensure => absent, }
}
default: {
- case $::kernel {
- openbsd: { $basic_require = File['/var/run/munin'] }
- default: { $basic_require = Package['munin-node'] }
- }
- if $require {
- $real_require = [ $require, $basic_require ]
- } else {
- $real_require = $basic_require
- }
file { $plugin:
ensure => "${real_script_path}/${plugin_src}",
- require => $real_require,
+ require => $::kernel ? {
+ OpenBSD => File['/var/run/munin'],
+ default => Package['munin-node']
+ },
notify => Service['munin-node'];
}
if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
@@ -56,11 +50,6 @@ define munin::plugin (
content => "[${name}]\n$config\n",
mode => 0644, owner => root, group => 0,
}
- if $require {
- File[$plugin_conf]{
- require +> $require,
- }
- }
}
}
}