mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
IcingaConfig: workaround for no host in service
This commit is contained in:
parent
b2b189c425
commit
646a7dc067
@ -473,6 +473,14 @@ class IcingaConfig
|
||||
const DirectorVarsOverride = "%s"
|
||||
|
||||
template Service "%s" {
|
||||
/**
|
||||
* Seems that host is missing when used in a service object, works fine for
|
||||
* apply rules
|
||||
*/
|
||||
if (! host) {
|
||||
var host = get_host(host_name)
|
||||
}
|
||||
|
||||
if (vars) {
|
||||
vars += host.vars[DirectorVarsOverride][name]
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user