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
f81413a66d
commit
9746631e97
2 changed files with 7 additions and 3 deletions
|
|
@ -51,9 +51,6 @@ function Start-IcingaAgentDirectorWizard()
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($HostKnown -eq $FALSE) {
|
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);
|
$SelfServiceAPIKey = Register-IcingaDirectorSelfServiceHost -DirectorUrl $DirectorUrl -ApiKey $SelfServiceAPIKey -Hostname (Get-IcingaHostname @Arguments);
|
||||||
|
|
||||||
# Host is already registered
|
# Host is already registered
|
||||||
|
|
@ -74,9 +71,14 @@ function Start-IcingaAgentDirectorWizard()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$IcingaTicket = Get-IcingaDirectorSelfServiceTicket -DirectorUrl $DirectorUrl -ApiKey $SelfServiceAPIKey;
|
||||||
|
|
||||||
$DirectorOverrideArgs.Add(
|
$DirectorOverrideArgs.Add(
|
||||||
'DirectorUrl', $DirectorUrl
|
'DirectorUrl', $DirectorUrl
|
||||||
);
|
);
|
||||||
|
$DirectorOverrideArgs.Add(
|
||||||
|
'Ticket', $IcingaTicket
|
||||||
|
);
|
||||||
if ([string]::IsNullOrEmpty($TemplateKey) -eq $FALSE) {
|
if ([string]::IsNullOrEmpty($TemplateKey) -eq $FALSE) {
|
||||||
$DirectorOverrideArgs.Add(
|
$DirectorOverrideArgs.Add(
|
||||||
'SelfServiceAPIKey', $TemplateKey
|
'SelfServiceAPIKey', $TemplateKey
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ function Start-IcingaAgentInstallWizard()
|
||||||
$SelfServiceAPIKey = $Result.Value;
|
$SelfServiceAPIKey = $Result.Value;
|
||||||
$InstallerArguments = $Result.Args;
|
$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;
|
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'PackageSource' -Value $PackageSource -InstallerArguments $InstallerArguments;
|
||||||
$PackageSource = $Result.Value;
|
$PackageSource = $Result.Value;
|
||||||
$InstallerArguments = $Result.Args;
|
$InstallerArguments = $Result.Args;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue