aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/ups.pp
blob: ccf37d9d7b19f1cfae3c66e7964288f7afa4e62a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class ups {
  case $ups_type {
    '': { $ups_type = 'usb' }
  }

  case $ups_cable {
    '': { $ups_cable = 'usb' }
  }

  case $ups_dev {
    '': { $ups_dev = '/dev/usb/hiddev0' }
  }

  case $ups_nisip {
    '': { $ups_nisip = '127.0.0.1' }
  }

  case $ups_polltime {
    '': { $ups_polltime = '60' }
  }

  case $has_ups {
    true: {
      class { "apcupsd":
        upstype  => $ups_type,
        cable    => $ups_cable,
        device   => $ups_dev,
        nisip    => $ups_nisip,
        polltime => $ups_polltime,
      }
    }
  }
}