blob: cc6677ea62b293ee1b0b0f7dcaa5fde8e17ae75b (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
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 $ups_onbatterydelay {
'': { $ups_onbatterydelay = '6' }
}
case $ups_batterylevel {
'': { $ups_batterylevel = '5' }
}
case $ups_minutes {
'': { $ups_minutes = '3' }
}
case $has_ups {
true: {
class { "apcupsd":
upstype => $ups_type,
cable => $ups_cable,
device => $ups_dev,
nisip => $ups_nisip,
polltime => $ups_polltime,
onbatterydelay => $ups_onbatterydelay,
batterylevel => $ups_batterylevel,
minutes => $ups_minutes,
}
}
}
}
|