Puppet Class: raid

Defined in:
modules/raid/manifests/init.pp

Overview

Parameters:

  • write_cache_policy (Any) (defaults to: undef)
  • check_interval (Any) (defaults to: 10)
  • retry_interval (Any) (defaults to: 10)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'modules/raid/manifests/init.pp', line 15

class raid (
    $write_cache_policy = undef,
    $check_interval = 10,
    $retry_interval = 10,
){

    if empty($write_cache_policy) {
        $check_raid = '/usr/bin/sudo /usr/local/lib/nagios/plugins/check_raid'
    } else {
        $check_raid = "/usr/bin/sudo /usr/local/lib/nagios/plugins/check_raid --policy ${write_cache_policy}"
    }

    if 'raid' in $facts {
      $facts['raid'].each |String $raid| {
        include "raid::${raid}"
      }
    } else {
      warning('no raid controller detected')
    }

    file { '/usr/local/lib/nagios/plugins/check_raid':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/raid/check-raid.py';
    }

    sudo::user { 'nagios_raid':
        user       => 'nagios',
        privileges => ['ALL = NOPASSWD: /usr/local/lib/nagios/plugins/check_raid'],
    }
}