summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-06 10:07:42 +0000
committeram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-06 10:07:42 +0000
commitfa3b0c563327deb29405eeacdf6ba7dd14d01869 (patch)
tree8446ffda3ff8056db98bc621c42f5bef37a2c52a
parentab7b943e792cbea075c10c118c81144ebb21b5f4 (diff)
haette ich schon lange an nen anderen ort tun sollen ...
korrektur Service bei gentoo heisst munin-node git-svn-id: https://svn/ipuppet/trunk/modules/munin@209 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
-rw-r--r--manifests/plugin.pp34
1 files changed, 21 insertions, 13 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index de8f0a3..724e9a4 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -4,28 +4,30 @@
define munin::plugin (
$ensure = "present",
- $script_path = '',
+ $script_path = $script_path_default,
$config = '')
{
- #$script_path_default = "/usr/share/munin/plugins"
case $operatingsystem {
debian: {
$munin_node_service = "munin-node"
- $script_path_default = "/usr/share/munin/plugins"
+ $munin_node_package = "munin-node"
+ #$script_path_default = "/usr/share/munin/plugins"
}
gentoo: {
- $munin_node_service = "munin"
- $script_path_default = "/usr/libexec/munin/plugins"
+ $munin_node_service = "munin-node"
+ $munin_node_package = "munin"
+ #$script_path_default = "/usr/libexec/munin/plugins"
}
default: {
- $munin_node_service = "munin"
- $script_path_default = "/usr/libexec/munin/plugins"
+ $munin_node_service = "munin-node"
+ $munin_node_package = "munin"
+ #$script_path_default = "/usr/libexec/munin/plugins"
}
}
- $script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default }
+ #$script_path_correct = $script_path ? { '' => $script_path_default, default => $script_path_default }
$plugin_src = $ensure ? { "present" => $name, default => $ensure }
- debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path_correct" )
+ debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" )
$plugin = "/etc/munin/plugins/$name"
$plugin_conf = "/etc/munin/plugin-conf.d/$name.conf"
case $ensure {
@@ -37,8 +39,8 @@ define munin::plugin (
#$plugin_src = $ensure ? { "present" => $name, default => $ensure }
debug ( "munin_plugin: making $plugin using src: $plugin_src" )
file { $plugin:
- ensure => "$script_path_correct/${plugin_src}",
- require => Package[$munin_node_service],
+ ensure => "$script_path/${plugin_src}",
+ require => Package[$munin_node_package],
notify => Service[$munin_node_service],
}
}
@@ -87,8 +89,14 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') {
class munin::plugins::base {
case $operatingsystem {
- gentoo: { $munin_node_service = "munin" }
- debian: { $munin_node_service = "munin-node" }
+ gentoo: {
+ $munin_node_package = "munin"
+ $munin_node_service = "munin-node"
+ }
+ debian: {
+ $munin_node_service = "munin-node"
+ $munin_node_package = "munin-node"
+ }
}
file {
[ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: