aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/ups.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-11-08 22:44:51 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-11-08 22:44:51 -0200
commitad4d8d1b0a207ecd47dfaac90c47a6bd0f7db612 (patch)
treeb6677bf92020f436294b20e0ea07f70fd130737c /manifests/subsystems/ups.pp
parent99a5649c8d024d68046ca6dc6747ae7d66ca3ab1 (diff)
downloadpuppet-nodo-ad4d8d1b0a207ecd47dfaac90c47a6bd0f7db612.tar.gz
puppet-nodo-ad4d8d1b0a207ecd47dfaac90c47a6bd0f7db612.tar.bz2
Adding UPS NIS support
Diffstat (limited to 'manifests/subsystems/ups.pp')
-rw-r--r--manifests/subsystems/ups.pp28
1 files changed, 25 insertions, 3 deletions
diff --git a/manifests/subsystems/ups.pp b/manifests/subsystems/ups.pp
index 558941e..648e0df 100644
--- a/manifests/subsystems/ups.pp
+++ b/manifests/subsystems/ups.pp
@@ -1,12 +1,34 @@
class ups {
include apcupsd
+ 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: {
apcupsd::ups { "ups0":
- upstype => 'usb',
- cable => 'usb',
- device => '/dev/usb/hiddev0',
+ upstype => $ups_type,
+ cable => $ups_cable,
+ device => $ups_dev,
+ nisip => $ups_nisip,
+ polltime => $ups_polltime,
}
}
}