From 98c15e46bb325d2f18616c5e080f94c47126b113 Mon Sep 17 00:00:00 2001 From: am Date: Fri, 8 Feb 2008 11:12:45 +0000 Subject: bla git-svn-id: https://svn/ipuppet/trunk/modules/munin@783 d66ca3ae-40d7-4aa7-90d4-87d79ca94279 --- manifests/plugin.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'manifests') 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; -- cgit v1.2.3