Allow manual definition of nagios host groups

This commit is contained in:
Ossi Salmi 2012-12-05 11:30:14 +02:00
parent 0dc654e4ca
commit 8b70966a7d

View file

@ -1,9 +1,24 @@
# Configure nagios target.
#
# === Global variables
#
# $nagios_target_group:
# Host and service group name. Defaults to $domain.
#
class nagios::target {
if $nagios_target_group {
$group = $nagios_target_group
} else {
if $::domain {
$group = $::domain
} else {
$group = "unknown"
}
}
@@nagios::host { $::homename:
group => $::domain,
group => $group,
osname => $::operatingsystem,
osicon => $::osfamily ? {
"" => "NONE",
@ -13,7 +28,7 @@ class nagios::target {
Nagios::Service {
host => $::homename,
group => $::domain,
group => $group,
}
}