Defined Type: nut::client::ups
- Defined in:
- manifests/client/ups.pp
Overview
Add a local or remote UPS to monitor.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'manifests/client/ups.pp', line 38
define nut::client::ups (
String $user,
String $password,
Optional[Tuple[String, Boolean, Boolean]] $certhost = undef,
Integer[0] $powervalue = 1,
Enum['master', 'slave'] $type = $title ? {
/@localhost(:\d+)?$/ => 'master',
default => 'slave',
},
Nut::Device $ups = $title,
) {
if ! defined(Class['nut::common']) {
fail('You must include the nut::common base class before using any nut::client defined resources')
}
::concat::fragment { "nut upsmon ${ups}":
content => template("${module_name}/upsmon.ups.erb"),
target => "${::nut::common::conf_dir}/upsmon.conf",
}
}
|