IcingaConfig: host-generated services should...

...respect new overrides
This commit is contained in:
Thomas Gelf 2016-09-08 13:07:04 +00:00
parent d44c06fce0
commit b8fb0d4267
1 changed files with 8 additions and 7 deletions

View File

@ -500,26 +500,27 @@ apply Service for (title => params in host.vars["%s"]) {
var override = host.vars["%s_vars"][title] var override = host.vars["%s_vars"][title]
if (typeof(params["templates"]) in [Array, String]) { if (typeof(params["templates"]) in [Array, String]) {
import params["templates"] for (tpl in params["templates"]) {
import tpl
}
} else { } else {
import title import title
} }
if (typeof(params.vars) == Dictionary) { if (typeof(params.vars) == Dictionary) {
vars += params vars += params.vars
}
if (typeof(override.vars) == Dictionary) {
vars += override.vars
} }
if (typeof(params["host_name"]) == String) { if (typeof(params["host_name"]) == String) {
host_name = params["host_name"] host_name = params["host_name"]
} }
import "%s"
} }
', ',
$varname, $varname,
$varname $varname,
$this->connection->settings()->override_services_templatename
); );
} }