mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaConfig: deploy endpoints, remove 'master'
This commit is contained in:
parent
379269653d
commit
b0f98c2d07
@ -317,10 +317,10 @@ throw $e;
|
|||||||
continue;
|
continue;
|
||||||
} elseif ($object->isTemplate()) {
|
} elseif ($object->isTemplate()) {
|
||||||
$filename = strtolower($type) . '_templates';
|
$filename = strtolower($type) . '_templates';
|
||||||
$zone = 'master';
|
$zone = $ourGlobalZone;
|
||||||
} else {
|
} else {
|
||||||
$filename = strtolower($type) . 's';
|
$filename = strtolower($type) . 's';
|
||||||
$zone = 'global';
|
$zone = $ourGlobalZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type === 'zone') {
|
if ($type === 'zone') {
|
||||||
@ -328,16 +328,13 @@ throw $e;
|
|||||||
} elseif ($object->hasProperty('zone_id') && ($zone_id = $object->zone_id)) {
|
} elseif ($object->hasProperty('zone_id') && ($zone_id = $object->zone_id)) {
|
||||||
$zone = $this->getZoneName($zone_id);
|
$zone = $this->getZoneName($zone_id);
|
||||||
} else {
|
} else {
|
||||||
$zone = 'master';
|
$zone = $ourGlobalZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($type, array('command', 'zone'))) {
|
if (in_array($type, array('command', 'zone'))) {
|
||||||
$filename = 'zones.d/' . $ourGlobalZone . '/' . $filename;
|
$filename = 'zones.d/' . $ourGlobalZone . '/' . $filename;
|
||||||
} elseif ($type === 'endpoint') {
|
} elseif ($type === 'endpoint') {
|
||||||
$filename = 'conf.d/endpoints';
|
$filename = 'conf.d/endpoints';
|
||||||
continue;
|
|
||||||
} elseif ($zone === 'master') {
|
|
||||||
$filename = 'conf.d/' . $filename;
|
|
||||||
} else {
|
} else {
|
||||||
$filename = 'zones.d/' . $zone . '/' . $filename;
|
$filename = 'zones.d/' . $zone . '/' . $filename;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user