aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/ups.pp
blob: 987aadfc7675e1ef8b665ddca3692f043636f67f (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
class nodo::subsystem::ups(
    $include        = hiera('nodo::subsystem::ups::include',        false),
    $ensure         = hiera('nodo::subsystem::ups::ensure',         'present'),
    $type           = hiera('nodo::subsystem::ups::type',           'usb'),
    $cable          = hiera('nodo::subsystem::ups::cable',          'usb'),
    $dev            = hiera('nodo::subsystem::ups::dev',            '/dev/usb/hiddev0'),
    $nisip          = hiera('nodo::subsystem::ups::nisip',          '127.0.0.1'),
    $polltime       = hiera('nodo::subsystem::ups::polltime',       '60'),
    $onbatterydelay = hiera('nodo::subsystem::ups::onbatterydelay', '6'),
    $batterylevel   = hiera('nodo::subsystem::ups::batterylevel',   '5'),
    $minutes        = hiera('nodo::subsystem::ups::minutes',        '3'),
) {
  case $include {
    true: {
      class { "apcupsd":
        upstype        => $type,
        cable          => $cable,
        device         => $dev,
        nisip          => $nisip,
        polltime       => $polltime,
        onbatterydelay => $onbatterydelay,
        batterylevel   => $batterylevel,
        minutes        => $minutes,
        ensure         => $ensure,
      }
    }
  }
}