summaryrefslogtreecommitdiff
path: root/manifests/plugin.pp
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
commit7c962d612c78e13cf4017e4681d38a7f71733bfa (patch)
treed8e48d1097ff8902c3cbdb99ad6fad26f892efa3 /manifests/plugin.pp
parent7327f05bc389178aa18351d9aa6016420ea87aa3 (diff)
path als class inlcude
git-svn-id: https://rfd.cronopios.org/ipuppet/trunk/modules/munin@685 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests/plugin.pp')
-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" ]: