From b8fb0d4267097f1a83802a16a015cf701978491d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 8 Sep 2016 13:07:04 +0000 Subject: [PATCH] IcingaConfig: host-generated services should... ...respect new overrides --- library/Director/IcingaConfig/IcingaConfig.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php index f22d67ab..60676723 100644 --- a/library/Director/IcingaConfig/IcingaConfig.php +++ b/library/Director/IcingaConfig/IcingaConfig.php @@ -500,26 +500,27 @@ apply Service for (title => params in host.vars["%s"]) { var override = host.vars["%s_vars"][title] if (typeof(params["templates"]) in [Array, String]) { - import params["templates"] + for (tpl in params["templates"]) { + import tpl + } } else { import title } if (typeof(params.vars) == Dictionary) { - vars += params - } - - if (typeof(override.vars) == Dictionary) { - vars += override.vars + vars += params.vars } if (typeof(params["host_name"]) == String) { host_name = params["host_name"] } + + import "%s" } ', $varname, - $varname + $varname, + $this->connection->settings()->override_services_templatename ); }