From 1115e76a91b398ccb45f2cd5ea2195cb3351bc22 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Feb 2008 20:31:50 +0000 Subject: fixed? munin plugin problems git-svn-id: https://svn/ipuppet/trunk/modules/munin@764 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/client.pp | 18 +++--------------- manifests/plugin.pp | 19 ++++++------------- 2 files changed, 9 insertions(+), 28 deletions(-) (limited to 'manifests') diff --git a/manifests/client.pp b/manifests/client.pp index 7dcbbe1..ba59333 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -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, } diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 5fd4190..97c89b2 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -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']; } } } -- cgit v1.2.3