Added support for apcupsd clients.
This commit is contained in:
parent
b021f1ae1c
commit
301a47af23
2 changed files with 32 additions and 0 deletions
|
@ -13,4 +13,28 @@ class apcupsd {
|
||||||
require => Package["apcupsd"],
|
require => Package["apcupsd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { "/etc/apcupsd/apcupsd.conf":
|
||||||
|
ensure => present,
|
||||||
|
mode => 0644,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
require => Package["apcupsd"],
|
||||||
|
notify => Service["apcupsd"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install APC UPS client.
|
||||||
|
#
|
||||||
|
# === Global variables
|
||||||
|
#
|
||||||
|
# $apcupsd_server:
|
||||||
|
# Server address where apcupsd server is running.
|
||||||
|
#
|
||||||
|
class apcupsd::client inherits apcupsd {
|
||||||
|
|
||||||
|
File["/etc/apcupsd/apcupsd.conf"] {
|
||||||
|
content => template("apcupsd/apcupsd.conf.client.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
8
apcupsd/templates/apcupsd.conf.client.erb
Normal file
8
apcupsd/templates/apcupsd.conf.client.erb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
## apcupsd.conf v1.1 ##
|
||||||
|
UPSCABLE ether
|
||||||
|
UPSTYPE net
|
||||||
|
LOCKFILE /var/lock
|
||||||
|
DEVICE <%= apcupsd_server %>:3551
|
||||||
|
UPSCLASS standalone
|
||||||
|
UPSMODE disable
|
||||||
|
NETTIME 10
|
Loading…
Add table
Reference in a new issue