diff options
author | andreas <andreas@immerda.ch> | 2008-02-08 10:37:32 +0000 |
---|---|---|
committer | andreas <andreas@immerda.ch> | 2008-02-08 10:37:32 +0000 |
commit | f13bb0f6bb9a6f067bda5d4380891c492924586f (patch) | |
tree | d6eea8df8dd8746c1899053d5be63dfcb2c90d76 | |
parent | f2d6994a63d6ad1fcbd9e18dd32423e34e9e1a3d (diff) |
deploy function
-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" ]: |