summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authoram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-01 15:24:28 +0000
committeram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-01 15:24:28 +0000
commitd28a2979f038b6b48322584a43932f66c488fb03 (patch)
treed8e48d1097ff8902c3cbdb99ad6fad26f892efa3 /manifests
parent315495b18f4c5e1a2ced06e603a1617e5867b41a (diff)
path als class inlcude
git-svn-id: https://svn/ipuppet/trunk/modules/munin@685 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugin.pp59
1 files changed, 23 insertions, 36 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index d9b944c..572f79b 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -2,31 +2,39 @@
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
-define munin::plugin (
- $ensure = "present",
- $script_path = '/usr/libexec/munin/plugins',
- $config = '')
+class munin::plugin::paths
{
case $operatingsystem {
- debian: {
+ gentoo: {
+ $munin_node_package = "munin"
+ $munin_node_service = "munin"
+ $script_path_default = "/usr/libexec/munin/plugins"
+ }
+ debian: {
$munin_node_service = "munin-node"
$munin_node_package = "munin-node"
- }
- centos: {
+ $script_path_default = "/usr/share/munin/plugins"
+ }
+ centos: {
$munin_node_service = "munin-node"
$munin_node_package = "munin-node"
- }
- gentoo: {
- #$munin_node_service = "munin-node"
- $munin_node_service = "munin"
- $munin_node_package = "munin"
- $script_path = $script_path_default,
- }
+ $script_path_default = "/usr/share/munin/plugins"
+ }
default: {
$munin_node_service = "munin-node"
$munin_node_package = "munin-node"
+ $script_path_default = "/usr/share/munin/plugins"
}
}
+
+{
+
+define munin::plugin (
+ $ensure = "present",
+ $script_path = '/usr/libexec/munin/plugins',
+ $config = '')
+{
+ include munin::plugin::paths
$plugin_src = $ensure ? { "present" => $name, default => $ensure }
debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" )
@@ -98,30 +106,9 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') {
}
class munin::plugins::base {
+ include munin::plugin::paths
case $operatingsystem {
- gentoo: {
- $munin_node_package = "munin"
- $munin_node_service = "munin"
- $script_path_default = "/usr/libexec/munin/plugins"
- }
- debian: {
- $munin_node_service = "munin-node"
- $munin_node_package = "munin-node"
- $script_path_default = "/usr/libexec/munin/plugins"
- }
- centos: {
- $munin_node_service = "munin-node"
- $munin_node_package = "munin-node"
- $script_path_default = "/usr/libexec/munin/plugins"
- }
- default: {
- $munin_node_service = "munin-node"
- $munin_node_package = "munin-node"
- $script_path_default = "/usr/libexec/munin/plugins"
- }
- }
- case $operatingsystem {
centos: {
file {
[ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]: