From f6d5286638d722965f424bb5a15b620d3ecfbbaa Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 8 Nov 2010 22:43:30 -0200 Subject: Adding NIS support --- manifests/init.pp | 3 ++- 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 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 default is 3551 as registered with the IANA # port to use for sending STATUS and EVENTS data over the network. -- cgit v1.2.3