Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
duritong committed Feb 28, 2013
1 parent d3dae3c commit 61cfbbf
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions manifests/plugin/deploy.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') {
# deploy and register a munin plugin
define munin::plugin::deploy(
$ensure = 'present',
$source = '',
$config = '',
) {
$plugin_src = $ensure ? {
'present' => $name,
'absent' => $name,
default => $ensure
'absent' => $name,
default => $ensure
}
$real_source = $source ? {
'' => "munin/plugins/$plugin_src",
'' => "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;
path => "${munin::plugin::scriptpaths::script_path}/${name}",
source => "puppet:///modules/${real_source}",
owner => root,
group => 0,
mode => '0755';
}

if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
Expand All @@ -35,9 +42,13 @@
}
}
# register the plugin
munin::plugin{$name:
ensure => $ensure,
config => $config
}
if $require {
munin::plugin{$name: ensure => $ensure, config => $config, require => $require }
} else {
munin::plugin{$name: ensure => $ensure, config => $config }
Munin::Plugin[$name]{
require => $require
}
}
}

0 comments on commit 61cfbbf

Please sign in to comment.