diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-11-08 22:43:30 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-11-08 22:43:30 -0200 |
commit | f6d5286638d722965f424bb5a15b620d3ecfbbaa (patch) | |
tree | ba55046f75da0080c094f98a2bc2d01d2685eed3 | |
parent | 48584c8cc51119c6b0dfbde767e34043e8aa080d (diff) | |
download | puppet-apcupsd-f6d5286638d722965f424bb5a15b620d3ecfbbaa.tar.gz puppet-apcupsd-f6d5286638d722965f424bb5a15b620d3ecfbbaa.tar.bz2 |
Adding NIS support
-rw-r--r-- | manifests/init.pp | 3 | ||||
-rw-r--r-- | templates/apcupsd.conf.erb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index aca9a82..f188673 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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', diff --git a/templates/apcupsd.conf.erb b/templates/apcupsd.conf.erb index b5a5a16..03a9c08 100644 --- a/templates/apcupsd.conf.erb +++ b/templates/apcupsd.conf.erb @@ -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. |