blob: 6d849fdca3706b7236f5618f3255e729605a1c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
define nagios::plugin(
$source = 'absent',
$ensure = present
){
file{$name:
path => $::hardwaremodel ? {
'x86_64' => $::operatingsystem ? {
'debian' => "/usr/lib/nagios/plugins/${name}",
default => "/usr/lib64/nagios/plugins/${name}",
},
default => "/usr/lib/nagios/plugins/${name}",
},
ensure => $ensure,
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;
}
}
|