From b3fa11ddcd74bd9e02d778846b31c84acad3ca40 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:52:53 +0200 Subject: put file at correct location --- manifests/plugin/deploy.pp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 manifests/plugin/deploy.pp (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp new file mode 100644 index 0000000..24ac3d3 --- /dev/null +++ b/manifests/plugin/deploy.pp @@ -0,0 +1,37 @@ +define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { + $plugin_src = $ensure ? { + 'present' => $name, + 'absent' => $name, + default => $ensure + } + $real_source = $source ? { + '' => "munin/plugins/$plugin_src", + default => $source + } + include munin::plugin::scriptpaths + file { "munin_plugin_${name}": + path => "$munin::plugin::scriptpaths::script_path/${name}", + source => "puppet://$server/$real_source", + mode => 0755, owner => root, group => 0; + } + + case $kernel { + openbsd: { $basic_require = File['/var/run/munin'] } + default: { $basic_require = Package['munin-node'] } + } + if $require { + File["munin_plugin_${name}"]{ + require => [ $basic_require, $require ], + } + } else { + File["munin_plugin_${name}"]{ + require => $basic_require, + } + } + # register the plugin + if $require { + munin::plugin{$name: ensure => $ensure, config => $config, require => $require } + } else { + munin::plugin{$name: ensure => $ensure, config => $config } + } +} -- cgit v1.2.3 From d214a2f0ed7f37d2a40b596eab9d2c68d7c39a95 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:58:00 +0200 Subject: fixed typo --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 24ac3d3..47bf796 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -1,4 +1,4 @@ -define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') { +define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') { $plugin_src = $ensure ? { 'present' => $name, 'absent' => $name, -- cgit v1.2.3 From f1f906dda45a652697704331737166224382d0f3 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 14 Nov 2009 13:23:19 +0100 Subject: modules prefix path --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 47bf796..29d9978 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -11,7 +11,7 @@ define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') { include munin::plugin::scriptpaths file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$server/$real_source", + source => "puppet://$server/modlues/$real_source", mode => 0755, owner => root, group => 0; } -- cgit v1.2.3 From c2b3bc7cc42a3944b06088a2c66f77deaf3e2bd3 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 14 Nov 2009 13:33:13 +0100 Subject: fix typo --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 29d9978..846a873 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -11,7 +11,7 @@ define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') { include munin::plugin::scriptpaths file { "munin_plugin_${name}": path => "$munin::plugin::scriptpaths::script_path/${name}", - source => "puppet://$server/modlues/$real_source", + source => "puppet://$server/modules/$real_source", mode => 0755, owner => root, group => 0; } -- cgit v1.2.3