refactor things for >2.7
authormh <mh@immerda.ch>
Fri, 8 Jun 2012 16:03:50 +0000 (13:03 -0300)
committermh <mh@immerda.ch>
Fri, 8 Jun 2012 16:03:50 +0000 (13:03 -0300)
manifests/plugin.pp

index fec7b6b..af8b44a 100644 (file)
@@ -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,
-            }
-          }
         }
       }
     }