summaryrefslogtreecommitdiff
path: root/manifests/plugin/deploy.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/plugin/deploy.pp')
-rw-r--r--manifests/plugin/deploy.pp72
1 files changed, 36 insertions, 36 deletions
diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp
index 5003153..9e74afb 100644
--- a/manifests/plugin/deploy.pp
+++ b/manifests/plugin/deploy.pp
@@ -1,43 +1,43 @@
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:///modules/$real_source",
- mode => 0755, owner => root, group => 0;
- }
+ $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:///modules/${real_source}",
+ mode => 0755, owner => root, group => 0;
+ }
- if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
- File["munin_plugin_${name}"]{
- seltype => 'munin_exec_t',
- }
+ if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
+ File["munin_plugin_${name}"]{
+ seltype => 'munin_exec_t',
}
+ }
- 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,
- }
+ 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 ],
}
- # register the plugin
- if $require {
- munin::plugin{$name: ensure => $ensure, config => $config, require => $require }
- } else {
- munin::plugin{$name: ensure => $ensure, config => $config }
+ } 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 }
+ }
}