]> gitweb.fluxo.info Git - puppet-apcupsd.git/commitdiff
Adding NIS support
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 9 Nov 2010 00:43:30 +0000 (22:43 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 9 Nov 2010 00:43:30 +0000 (22:43 -0200)
manifests/init.pp
templates/apcupsd.conf.erb

index aca9a821b1ca28fef7c6b9896f1191a70865df81..f18867314cc8102ce288cf741f6248347f0c5ec7 100644 (file)
@@ -21,7 +21,8 @@ class apcupsd {
     ensure => installed,
   }
 
-  define ups($upstype = 'apcsmart', $cable = 'smart', $device = '/dev/ttyS0', $ensure = 'present') {
+  define ups($upstype = 'apcsmart', $cable = 'smart', $device = '/dev/ttyS0', $ensure = 'present',
+             $nisip = '127.0.0.1', $polltime = '60') {
 
     $ups_configured = $ensure ? {
       'present' => 'yes',
index b5a5a16d9e5edd87162ec705754f07e3743e8252..03a9c08efa78179e9a99cda1b9c698aa131d224c 100644 (file)
@@ -82,7 +82,7 @@ DEVICE <%= device %>
 #   will improve apcupsd's responsiveness to certain events at the cost of
 #   higher CPU utilization. The default of 60 is appropriate for most
 #   situations.
-#POLLTIME 60
+POLLTIME <%= polltime %>
 
 # LOCKFILE <path to lockfile>
 #   Path for device lock file. Not used on Win32.
@@ -188,7 +188,7 @@ NETSERVER on
 #  NIS will listen for connections only on that interface. Use the
 #  loopback address (127.0.0.1) to accept connections only from the
 #  local machine.
-NISIP 127.0.0.1
+NISIP <%= nisip %>
 
 # NISPORT <port> default is 3551 as registered with the IANA
 #  port to use for sending STATUS and EVENTS data over the network.