summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authoram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-04 17:24:33 +0000
committeram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-04 17:24:33 +0000
commit5300e9e26cfa65f0c182719b240a08f79ae76094 (patch)
treea6efa3ff4e6ee6956944c5dcb4c87fe55bc46846 /manifests
parent4d9eb3d04b2ed3efba52d45e2a24cf7ed7965151 (diff)
variable für munin-node-service (einmal munin-node, das andere mal munin)
git-svn-id: https://svn/ipuppet/trunk/modules/munin@189 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugin.pp54
1 files changed, 29 insertions, 25 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index 81d8ed4..1420260 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -7,6 +7,15 @@ define munin::plugin (
$script_path = "/usr/share/munin/plugins",
$config = '')
{
+ case $operatingsystem {
+ debian: {
+ $munin-node-service = "munin-node";
+ }
+ gentoo: {
+ $munin-node-service = "munin";
+ }
+ }
+ $plugin_src = $ensure ? { "present" => $name, default => $ensure }
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"
@@ -16,16 +25,12 @@ define munin::plugin (
file { $plugin: ensure => absent, }
}
default: {
- case $operatingsystem {
- debian: {
- $plugin_src = $ensure ? { "present" => $name, default => $ensure }
- debug ( "munin_plugin: making $plugin using src: $plugin_src" )
- file { $plugin:
- ensure => "$script_path/${plugin_src}",
- require => Package["munin-node"],
- notify => Service["munin-node"],
- }
- }
+ $plugin_src = $ensure ? { "present" => $name, default => $ensure }
+ debug ( "munin_plugin: making $plugin using src: $plugin_src" )
+ file { $plugin:
+ ensure => "$script_path/${plugin_src}",
+ require => Package[$munin-node-service],
+ notify => Service[$munin-node-service],
}
}
}
@@ -70,21 +75,20 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') {
}
}
-class munin::plugins::base {
-
- file {
- [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
- source => "puppet://$servername/munin/empty",
- ensure => directory, checksum => mtime,
- recurse => true, purge => true, force => true,
- mode => 0755, owner => root, group => root,
- notify => Service[munin-node];
- "/etc/munin/plugin-conf.d/munin-node":
- ensure => present,
- mode => 0644, owner => root, group => root,
- notify => Service[munin-node];
- }
-
+class munin::plugins::base-debian {
+
+ file {
+ [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
+ source => "puppet://$servername/munin/empty",
+ ensure => directory, checksum => mtime,
+ recurse => true, purge => true, force => true,
+ mode => 0755, owner => root, group => root,
+ notify => Service[$munin-node-service];
+ "/etc/munin/plugin-conf.d/munin-node":
+ ensure => present,
+ mode => 0644, owner => root, group => root,
+ notify => Service[$munin-node-service];
+ }
}
# handle if_ and if_err_ plugins