summaryrefslogtreecommitdiff
path: root/manifests/plugin.pp
diff options
context:
space:
mode:
authorandreas <andreas@immerda.ch>2008-02-08 11:12:45 +0000
committerandreas <andreas@immerda.ch>2008-02-08 11:12:45 +0000
commita871a342b8cdc7f8ee4ae2cf75f19ac34f2830d3 (patch)
tree0709385b588fc53322ae4cdf50f8668d32892c6b /manifests/plugin.pp
parent48b4e1e0f2005cff9a1d2a0d0236f99018827ac0 (diff)
bla
Diffstat (limited to 'manifests/plugin.pp')
-rw-r--r--manifests/plugin.pp11
1 files changed, 5 insertions, 6 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index a36eeaa..c1a9cb8 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -27,10 +27,10 @@ define munin::plugin (
{
include munin::plugin::scriptpaths
- #$script_path = $script_path_in ? { '' => $script_path, default => $script_path_in }
+ $real_script_path = $script_path_in ? { '' => ${munin::plugin::scriptpaths::script_path}, default => $script_path_in }
$plugin_src = $ensure ? { "present" => $name, default => $ensure }
- debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=$script_path" )
+ debug ( "munin_plugin: name=$name, ensure=$ensure, script_path=${munin::plugin::scriptpaths::script_path}" )
$plugin = "/etc/munin/plugins/$name"
$plugin_conf = "/etc/munin/plugin-conf.d/$name.conf"
case $ensure {
@@ -41,7 +41,7 @@ define munin::plugin (
default: {
debug ( "munin_plugin: making $plugin using src: $plugin_src" )
file { $plugin:
- ensure => "$script_path/${plugin_src}",
+ ensure => "${real_script_path}/${plugin_src}",
require => Package['munin-node'],
notify => Service['munin-node'];
}
@@ -82,7 +82,7 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') {
munin::plugin { $name:
ensure => $ensure,
config => $config,
- script_path => "/var/lib/puppet/modules/munin/plugins",
+ script_path_in => "/var/lib/puppet/modules/munin/plugins",
}
}
}
@@ -192,9 +192,8 @@ define munin::plugin::deploy ($source = '', $enabled = 'true') {
'' => "munin/plugins/$name",
default => $source
}
- include munin::plugin::scriptpaths
file { "munin_plugin_${name}":
- path => "${script_path}/${name}",
+ path => "${munin::plugin::scriptpaths::script_path}/${name}",
source => "puppet://$servername/$real_source",
ensure => file,
mode => 0755, owner => root, group => 0;