fixed? munin plugin problems
authormh <mh@immerda.ch>
Wed, 6 Feb 2008 20:31:50 +0000 (20:31 +0000)
committermh <mh@immerda.ch>
Wed, 6 Feb 2008 20:31:50 +0000 (20:31 +0000)
manifests/client.pp
manifests/plugin.pp

index 7dcbbe1..ba59333 100644 (file)
@@ -100,8 +100,6 @@ class munin::client::darwin
 
 class munin::client::debian 
 {
-    $script_path_default =  "/usr/share/munin/plugins"
-
        package { "munin-node": ensure => installed }
     # the plugin will need that
        package { "iproute": ensure => installed }
@@ -133,10 +131,10 @@ class munin::client::debian
 
 class munin::client::gentoo 
 {
-    $script_path_default =  "/usr/libexec/munin/plugins"
     $acpi_available = "absent"
-    package { 'munin':
-                alias => munin-node,
+    package { 'munin-node':
+                name => 'munin',
+                alias => 'munin-node',
                 ensure => present,
                 category => $operatingsystem ? {
                         gentoo => 'net-analyzer',
@@ -144,15 +142,6 @@ class munin::client::gentoo
                 },
     }
 
-    # link
-    # mh: really needed?
-#    file{
-#        "/etc/init.d/munin":
-#            ensure => "/etc/init.d/munin-node",
-#    }
-
-
-
        file {
                "/etc/munin/":
                        ensure => directory,
@@ -175,7 +164,6 @@ class munin::client::gentoo
 
 class munin::client::centos 
 {
-    $script_path_default =  "/usr/share/munin/plugins"
     package { 'munin-node':
                 ensure => present,
     }
index 5fd4190..97c89b2 100644 (file)
@@ -9,23 +9,15 @@ define munin::plugin (
 {
        case $operatingsystem {
                gentoo: {       
-                       $munin_node_package = "munin" 
-                       $munin_node_service = "munin-node" 
             $script_path =  "/usr/libexec/munin/plugins"
                        }
                debian: {               
-                       $munin_node_service = "munin-node" 
-                       $munin_node_package = "munin-node" 
             $script_path =  "/usr/share/munin/plugins"
                        }
                centos: {               
-                       $munin_node_service = "munin-node" 
-                       $munin_node_package = "munin-node" 
             $script_path =  "/usr/share/munin/plugins"
                        }
                default: {
-                       $munin_node_service = "munin-node"
-                       $munin_node_package = "munin-node" 
             $script_path =  "/usr/share/munin/plugins"
                }
        }
@@ -47,14 +39,14 @@ define munin::plugin (
                                centos, gentoo: {       
                                        file { $plugin:
                                                ensure => "$script_path/${plugin_src}",
-                                               require => Package[$munin_node_package];
+                                               require => Package['munin-node'];
                                        }
                                }
                                default: {
                                        file { $plugin:
                                                ensure => "$script_path/${plugin_src}",
-                                               require => Package[$munin_node_package],
-                                               notify => Service[$munin_node_service];
+                                               require => Package['munin-node'],
+                                               notify => Service['munin-node'];
                                        }
                                }
                        }
@@ -123,11 +115,12 @@ class munin::plugins::base {
                                ensure => directory, checksum => mtime,
                                recurse => true, purge => true, force => true, 
                                mode => 0755, owner => root, group => 0,
-                               notify => Service["$munin_node_service"];
+                               notify => Service['munin-node'];
                        "/etc/munin/plugin-conf.d/munin-node":
                                ensure => present, 
                                mode => 0644, owner => root, group => 0,
-                               notify => Service[$munin_node_service];
+                               notify => Service['munin-node'],
+                before => Package['munin-node'];
                    }
                }
        }