summaryrefslogtreecommitdiff
path: root/manifests/plugin
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-12-10 16:48:01 -0500
committerMicah Anderson <micah@riseup.net>2010-12-10 16:48:01 -0500
commit74f66a8e77b153552ef52efee03187320e1ce877 (patch)
tree9f842135e5a62df7d0ef503dcf045e19238ff013 /manifests/plugin
parentfefc399e7e28ec871d91089d535073c2bc705009 (diff)
standardize formatting
Diffstat (limited to 'manifests/plugin')
-rw-r--r--manifests/plugin/deploy.pp70
-rw-r--r--manifests/plugin/scriptpaths.pp3
2 files changed, 38 insertions, 35 deletions
diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp
index 846a873..d4dbf6d 100644
--- a/manifests/plugin/deploy.pp
+++ b/manifests/plugin/deploy.pp
@@ -1,37 +1,39 @@
-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/modules/$real_source",
- mode => 0755, owner => root, group => 0;
- }
+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/modules/$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 }
+ 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 }
+ }
}
diff --git a/manifests/plugin/scriptpaths.pp b/manifests/plugin/scriptpaths.pp
index ebaa6fa..bfdf1be 100644
--- a/manifests/plugin/scriptpaths.pp
+++ b/manifests/plugin/scriptpaths.pp
@@ -1,5 +1,6 @@
class munin::plugin::scriptpaths {
- case $operatingsystem {
+
+ case $operatingsystem {
gentoo: { $script_path = "/usr/libexec/munin/plugins" }
debian: { $script_path = "/usr/share/munin/plugins" }
centos: { $script_path = "/usr/share/munin/plugins" }