mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes missing Icinga CA Ticket handling
This commit is contained in:
parent
011cf54d1c
commit
64458d2bcb
2 changed files with 7 additions and 3 deletions
|
|
@ -51,9 +51,6 @@ function Start-IcingaAgentDirectorWizard()
|
|||
}
|
||||
|
||||
if ($HostKnown -eq $FALSE) {
|
||||
Write-Host $SelfServiceAPIKey;
|
||||
Write-Host (Get-IcingaHostname @Arguments);
|
||||
Write-Host $DirectorUrl;
|
||||
$SelfServiceAPIKey = Register-IcingaDirectorSelfServiceHost -DirectorUrl $DirectorUrl -ApiKey $SelfServiceAPIKey -Hostname (Get-IcingaHostname @Arguments);
|
||||
|
||||
# Host is already registered
|
||||
|
|
@ -74,9 +71,14 @@ function Start-IcingaAgentDirectorWizard()
|
|||
}
|
||||
}
|
||||
|
||||
$IcingaTicket = Get-IcingaDirectorSelfServiceTicket -DirectorUrl $DirectorUrl -ApiKey $SelfServiceAPIKey;
|
||||
|
||||
$DirectorOverrideArgs.Add(
|
||||
'DirectorUrl', $DirectorUrl
|
||||
);
|
||||
$DirectorOverrideArgs.Add(
|
||||
'Ticket', $IcingaTicket
|
||||
);
|
||||
if ([string]::IsNullOrEmpty($TemplateKey) -eq $FALSE) {
|
||||
$DirectorOverrideArgs.Add(
|
||||
'SelfServiceAPIKey', $TemplateKey
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ function Start-IcingaAgentInstallWizard()
|
|||
$SelfServiceAPIKey = $Result.Value;
|
||||
$InstallerArguments = $Result.Args;
|
||||
}
|
||||
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'Ticket' -Value $Ticket -InstallerArguments $InstallerArguments;
|
||||
$Ticket = $Result.Value;
|
||||
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'PackageSource' -Value $PackageSource -InstallerArguments $InstallerArguments;
|
||||
$PackageSource = $Result.Value;
|
||||
$InstallerArguments = $Result.Args;
|
||||
|
|
|
|||
Loading…
Reference in a new issue