diff options
author | am <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-02-08 10:37:32 +0000 |
---|---|---|
committer | am <am@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-02-08 10:37:32 +0000 |
commit | e691335a32b70606db86a463a8a5772714025a41 (patch) | |
tree | d6eea8df8dd8746c1899053d5be63dfcb2c90d76 /manifests/plugin.pp | |
parent | 07ae196caadb77245cfa5b7298d991212b7ded07 (diff) |
deploy function
git-svn-id: https://rfd.cronopios.org/ipuppet/trunk/modules/munin@778 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests/plugin.pp')
-rw-r--r-- | manifests/plugin.pp | 35 |
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" ]: |