summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authoram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-08 10:44:46 +0000
committeram <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-02-08 10:44:46 +0000
commitda9dc6cfaccebe21bef99211d7bb5b653dbda9a9 (patch)
tree82653a19fce6e5181fba8f33547b2bdf13b6d08b /manifests
parenta883c099328cce1c9805c153cc8b7f589a203601 (diff)
deploy aktiv
git-svn-id: https://svn/ipuppet/trunk/modules/munin@779 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugin.pp64
1 files changed, 13 insertions, 51 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index ae57378..bbb3cc4 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -187,7 +187,7 @@ class munin::plugins::selinux inherits munin::plugins::base {
plugin{"selinuxenforced": ensure => present;}
}
-define munin::plugins::deploy ($source = '') {
+define munin::plugins::deploy ($source = '', $enabled = 'true') {
$real_source = $source ? {
'' => "munin/plugins/$name",
default => $source
@@ -198,36 +198,18 @@ define munin::plugins::deploy ($source = '') {
source => "puppet://$servername/$real_source",
ensure => file,
mode => 0755, owner => root, group => 0;
- }
-
- plugin{$name: ensure => present }
+ }
+ if $enabled {
+ plugin{$name: ensure => present }
+ }
}
class munin::plugins::dom0 inherits munin::plugins::base {
- file {
- [ "$script_path/xen" ]:
- source => "puppet://$servername/munin/plugins/xen",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- [ "$script_path/xen-cpu" ]:
- source => "puppet://$servername/munin/plugins/xen-cpu",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- [ "$script_path/xen_memory" ]:
- source => "puppet://$servername/munin/plugins/xen_memory",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- [ "$script_path/xen_vbd" ]:
- source => "puppet://$servername/munin/plugins/xen_vbd",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- }
-
- plugin {
- [ xen, xen-cpu, xen_memory, xen_vbd ]:
- ensure => present;
- }
+ munin::plugins::deploy { "xen": }
+ munin::plugins::deploy { "xen-cpu": }
+ munin::plugins::deploy { "xen_memory": }
+ munin::plugins::deploy { "xen_vbd": }
}
class munin::plugins::domU inherits munin::plugins::base {
@@ -235,31 +217,11 @@ class munin::plugins::domU inherits munin::plugins::base {
}
class munin::plugins::djbdns inherits munin::plugins::base {
- file {
- [ "$script_path/tinydns" ]:
- source => "puppet://$servername/munin/plugins/tinydns",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- }
- plugin {
- [ tinydns ]:
- ensure => present;
- }
+ munin::plugins::deploy { "tinydns": }
}
class munin::plugins::postgres inherits munin::plugins::base {
- file {
- [ "$script_path/pg_conn" ]:
- source => "puppet://$servername/munin/plugins/pg_conn",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- [ "$script_path/pg__connections" ]:
- source => "puppet://$servername/munin/plugins/pg__connections",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- [ "$script_path/pg__locks" ]:
- source => "puppet://$servername/munin/plugins/pg__locks",
- ensure => file,
- mode => 0755, owner => root, group => 0;
- }
+ munin::plugins::deploy { "pg_conn": }
+ munin::plugins::deploy { "pg__connections": enabled => false }
+ munin::plugins::deploy { "pg__locks": enabled => false }
}