mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Removes hardcoded global zones
This commit is contained in:
parent
80f31cc1e6
commit
94898ff893
2 changed files with 2 additions and 7 deletions
|
|
@ -15,6 +15,8 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
|
||||
### Bugfixes
|
||||
|
||||
* [#188](https://github.com/Icinga/icinga-powershell-framework/pull/188) Removes hardcoded zones `director-global` and `global-zones` which were always set regardless of user specification. This fix will ensure the user has the option to add or not add these zones
|
||||
|
||||
## 1.3.0 (2020-12-01)
|
||||
|
||||
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/10?closed=1)
|
||||
|
|
|
|||
|
|
@ -58,13 +58,6 @@ function Write-IcingaAgentZonesConfig()
|
|||
$ZonesConf = [string]::Format('{0} endpoints = [ "{1}" ];{2}', $ZonesConf, $Hostname, "`r`n");
|
||||
$ZonesConf = [string]::Format('{0}{1}{2}{2}', $ZonesConf, '}', "`r`n");
|
||||
|
||||
if ($GlobalZones.Contains('director-global') -eq $FALSE) {
|
||||
$GlobalZones += 'director-global';
|
||||
}
|
||||
if ($GlobalZones.Contains('global-templates') -eq $FALSE) {
|
||||
$GlobalZones += 'global-templates';
|
||||
}
|
||||
|
||||
foreach ($zone in $GlobalZones) {
|
||||
$ZonesConf = [string]::Format('{0}object Zone "{1}" {2}{3}', $ZonesConf, $zone, '{', "`r`n");
|
||||
$ZonesConf = [string]::Format('{0} global = true;{1}', $ZonesConf, "`r`n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue