summaryrefslogtreecommitdiff
path: root/manifests/plugin.pp
blob: c2e76765a7e91cefd625487a7644139dc07974ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
define nagios::plugin(
    $source = 'absent',
    $ensure = present
){
  file{$name:
    path => $hardwaremodel ? {
      'x86_64' => "/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;
  }
}