diff options
Diffstat (limited to 'manifests/plugin.pp')
-rw-r--r-- | manifests/plugin.pp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4789345..abaa6e5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,13 +1,18 @@ define nagios::plugin( + $source = 'absent', $ensure = present ){ - file{$name: + @@file{$name: path => $hardwaremodel ? { 'x86_64' => "/usr/lib64/nagios/plugins/$name", default => "/usr/lib/nagios/plugins/$name", }, ensure => $ensure, - source => "puppet://$server/modules/nagios/plugins/$name", + source => $source ? { + 'absent' => "puppet:///modules/nagios/plugins/$name", + default => "puppet:///modules/$source" + }, + tag => 'nagios_plugin', require => Package['nagios-plugins'], owner => root, group => 0, mode => 0755; } |