From f13bb0f6bb9a6f067bda5d4380891c492924586f Mon Sep 17 00:00:00 2001 From: andreas Date: Fri, 8 Feb 2008 10:37:32 +0000 Subject: deploy function --- manifests/plugin.pp | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'manifests') 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" ]: -- cgit v1.2.3