diff options
author | mh <mh@immerda.ch> | 2008-06-13 20:02:35 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2008-06-13 20:02:35 +0000 |
commit | 805d56cac760f6d047b83c470c080bee3342165f (patch) | |
tree | 9d24e887cccc04e27a1d41c1fb1b830451b30327 /manifests/plugin.pp | |
parent | 86977f459f20c2bb55eec6cbed9f49fc2dca25ab (diff) |
Merge commit 'puzzle/development'
Diffstat (limited to 'manifests/plugin.pp')
-rw-r--r-- | manifests/plugin.pp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d24b580..76d12a0 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -45,11 +45,17 @@ define munin::plugin ( } default: { debug ( "munin_plugin: making $plugin using src: $plugin_src" ) + if $require { + $real_require = [ $require, Package['munin-node'] ] + } else { + $real_require = Package['munin-node'] + } file { $plugin: ensure => "${real_script_path}/${plugin_src}", - require => Package['munin-node'], + require => $real_require, notify => Service['munin-node']; } + } } case $config { @@ -69,6 +75,11 @@ define munin::plugin ( content => "[${name}]\n$config\n", mode => 0644, owner => root, group => 0, } + if $require { + File[$plugin_conf]{ + require +> $require, + } + } } } } @@ -107,11 +118,17 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/$real_source", - ensure => file, + require => Package['munin-node'], mode => 0755, owner => root, group => 0; } - - munin::plugin{$name: ensure => $ensure, config => $config } + if $require { + File["munin_plugin_${name}"]{ + require +> $require, + } + munin::plugin{$name: ensure => $ensure, config => $config, require => $require } + } else { + munin::plugin{$name: ensure => $ensure, config => $config } + } } ### clases for plugins |