diff options
author | Marcel Haerry <haerry@puzzle.ch> | 2008-05-19 18:46:07 +0200 |
---|---|---|
committer | Marcel Haerry <haerry@puzzle.ch> | 2008-05-19 18:46:07 +0200 |
commit | d4baba70e6c5d8b1a40100497dce733d7457ab6a (patch) | |
tree | d813f576ccbe8e2c06ae45d4da425806c4efef05 /manifests | |
parent | 673aa3cb3860aee50b80bda98156a3d6bf8e49d9 (diff) |
added require option for plugins
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/plugin.pp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp index d24b580..1745b40 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -50,6 +50,12 @@ define munin::plugin ( require => Package['munin-node'], notify => Service['munin-node']; } + + if $require { + File[$plugin]{ + require +> $require, + } + } } } 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,19 @@ 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; } + 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 } + } - munin::plugin{$name: ensure => $ensure, config => $config } + } ### clases for plugins |