nagios: Added support for defining more than one parent host.
This commit is contained in:
parent
0b5f9681fa
commit
2c9a0c1b62
1 changed files with 7 additions and 4 deletions
|
@ -440,9 +440,13 @@ define nagios::host($group="NONE", $osname="NONE", $osicon="NONE",
|
|||
require => File["/etc/nagios/conf.d"],
|
||||
}
|
||||
nagios_host { $name:
|
||||
ensure => present,
|
||||
use => "default",
|
||||
target => "${confdir}/host_${name}.cfg"
|
||||
ensure => present,
|
||||
use => "default",
|
||||
target => "${confdir}/host_${name}.cfg",
|
||||
parents => is_array($parent) ? {
|
||||
true => inline_template('<%= parent.join(",") -%>'),
|
||||
false => $parent,
|
||||
},
|
||||
}
|
||||
|
||||
if $osicon != "NONE" {
|
||||
|
@ -504,7 +508,6 @@ define nagios::host($group="NONE", $osname="NONE", $osicon="NONE",
|
|||
Nagios_Host[$name] {
|
||||
contact_groups => "all,${group}",
|
||||
hostgroups => $group,
|
||||
parents => $parent,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue