Update Start-IcingaAgentInstallWizard.psm1

This commit is contained in:
Alexander Plate 2020-06-23 12:37:20 +02:00
parent 92d5bdd025
commit d30a18346f

View file

@ -10,6 +10,7 @@ function Start-IcingaAgentInstallWizard()
$AddGlobalTemplates = $null, $AddGlobalTemplates = $null,
[string]$PackageSource, [string]$PackageSource,
[string]$AgentVersion, [string]$AgentVersion,
[string]$InstallDir,
$AllowVersionChanges, $AllowVersionChanges,
$UpdateAgent = $null, $UpdateAgent = $null,
$AddFirewallRule = $null, $AddFirewallRule = $null,
@ -79,6 +80,9 @@ function Start-IcingaAgentInstallWizard()
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'AgentVersion' -Value $AgentVersion -InstallerArguments $InstallerArguments; $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'AgentVersion' -Value $AgentVersion -InstallerArguments $InstallerArguments;
$AgentVersion = $Result.Value; $AgentVersion = $Result.Value;
$InstallerArguments = $Result.Args; $InstallerArguments = $Result.Args;
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'InstallDir' -Value $InstallDir -InstallerArguments $InstallerArguments;
$InstallDir = $Result.Value;
$InstallerArguments = $Result.Args;
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'CAPort' -Value $CAPort -InstallerArguments $InstallerArguments; $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'CAPort' -Value $CAPort -InstallerArguments $InstallerArguments;
$CAPort = $Result.Value; $CAPort = $Result.Value;
$InstallerArguments = $Result.Args; $InstallerArguments = $Result.Args;
@ -534,7 +538,7 @@ function Start-IcingaAgentInstallWizard()
} }
if ($RunInstaller) { if ($RunInstaller) {
if ((Install-IcingaAgent -Version $AgentVersion -Source $PackageSource -AllowUpdates $AllowVersionChanges) -Or $Reconfigure) { if ((Install-IcingaAgent -Version $AgentVersion -Source $PackageSource -AllowUpdates $AllowVersionChanges -InstallDir $InstallDir) -Or $Reconfigure) {
Reset-IcingaAgentConfigFile; Reset-IcingaAgentConfigFile;
Move-IcingaAgentDefaultConfig; Move-IcingaAgentDefaultConfig;
Set-IcingaAgentNodeName -Hostname $Hostname; Set-IcingaAgentNodeName -Hostname $Hostname;