Fixes CA endpoint configuration

This commit is contained in:
Lord Hepipud 2019-11-03 19:32:41 +01:00
parent 47a505ea77
commit 011cf54d1c

View file

@ -15,7 +15,7 @@ function Convert-IcingaDirectorSelfServiceArguments()
AllowVersionChanges = $JsonInput.allow_updates;
GlobalZones = $JsonInput.global_zones;
ParentZone = $JsonInput.parent_zone;
CAEndpoint = $JsonInput.ca_server;
#CAEndpoint = $JsonInput.ca_server;
Endpoints = $JsonInput.parent_endpoints;
AddFirewallRule = $JsonInput.agent_add_firewall_rule;
AcceptConnections = $JsonInput.agent_add_firewall_rule;
@ -58,6 +58,11 @@ function Convert-IcingaDirectorSelfServiceArguments()
$DirectorArguments.Add(
'EndpointConnections', $NetworkDefault
);
$EndpointConnections = $NetworkDefault.Split(',');
$DirectorArguments.Add(
'CAEndpoint', (Get-IPConfigFromString $EndpointConnections[0]).address
);
}
return $DirectorArguments;