summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authoram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-08 10:37:32 +0000
committeram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-08 10:37:32 +0000
commita883c099328cce1c9805c153cc8b7f589a203601 (patch)
treed6eea8df8dd8746c1899053d5be63dfcb2c90d76 /manifests
parent8f58fe2d444587451c0e042574f2931a4162ee08 (diff)
deploy function
git-svn-id: https://svn/ipuppet/trunk/modules/munin@778 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugin.pp35
1 files changed, 21 insertions, 14 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index 0363317..ae57378 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -40,20 +40,10 @@ define munin::plugin (
}
default: {
debug ( "munin_plugin: making $plugin using src: $plugin_src" )
- case $operatingsystem {
- centos, gentoo: {
- file { $plugin:
- ensure => "$script_path/${plugin_src}",
- require => Package['munin-node'];
- }
- }
- default: {
- file { $plugin:
- ensure => "$script_path/${plugin_src}",
- require => Package['munin-node'],
- notify => Service['munin-node'];
- }
- }
+ file { $plugin:
+ ensure => "$script_path/${plugin_src}",
+ require => Package['munin-node'],
+ notify => Service['munin-node'];
}
}
}
@@ -197,6 +187,23 @@ class munin::plugins::selinux inherits munin::plugins::base {
plugin{"selinuxenforced": ensure => present;}
}
+define munin::plugins::deploy ($source = '') {
+ $real_source = $source ? {
+ '' => "munin/plugins/$name",
+ default => $source
+ }
+ include munin::plugins::scriptpaths
+ file { "munin_plugin_${name}:
+ path => "$script_path/$name",
+ source => "puppet://$servername/$real_source",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ }
+
+ plugin{$name: ensure => present }
+
+}
+
class munin::plugins::dom0 inherits munin::plugins::base {
file {
[ "$script_path/xen" ]: