From b0f98c2d0716dd5a7898cca1bcc5147b3d3cd414 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 2 Dec 2015 16:46:13 +0100 Subject: [PATCH] IcingaConfig: deploy endpoints, remove 'master' --- library/Director/IcingaConfig/IcingaConfig.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php index fa87a79b..b86802f3 100644 --- a/library/Director/IcingaConfig/IcingaConfig.php +++ b/library/Director/IcingaConfig/IcingaConfig.php @@ -317,10 +317,10 @@ throw $e; continue; } elseif ($object->isTemplate()) { $filename = strtolower($type) . '_templates'; - $zone = 'master'; + $zone = $ourGlobalZone; } else { $filename = strtolower($type) . 's'; - $zone = 'global'; + $zone = $ourGlobalZone; } if ($type === 'zone') { @@ -328,16 +328,13 @@ throw $e; } elseif ($object->hasProperty('zone_id') && ($zone_id = $object->zone_id)) { $zone = $this->getZoneName($zone_id); } else { - $zone = 'master'; + $zone = $ourGlobalZone; } if (in_array($type, array('command', 'zone'))) { $filename = 'zones.d/' . $ourGlobalZone . '/' . $filename; } elseif ($type === 'endpoint') { $filename = 'conf.d/endpoints'; -continue; - } elseif ($zone === 'master') { - $filename = 'conf.d/' . $filename; } else { $filename = 'zones.d/' . $zone . '/' . $filename; }