mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixies various Icinga Director IMC issues
This commit is contained in:
parent
227367999d
commit
4b7b86785f
5 changed files with 44 additions and 23 deletions
|
|
@ -12,27 +12,29 @@ function Install-Icinga()
|
|||
if ($global:Icinga.ContainsKey('InstallWizard') -eq $FALSE) {
|
||||
$global:Icinga.Add(
|
||||
'InstallWizard', @{
|
||||
'AdminShell' = (Test-AdministrativeShell);
|
||||
'LastInput' = '';
|
||||
'LastNotice' = '';
|
||||
'LastError' = '';
|
||||
'HeaderPreview' = '';
|
||||
'LastParent' = [System.Collections.ArrayList]@();
|
||||
'LastValues' = @();
|
||||
'Config' = @{ };
|
||||
'ConfigSwap' = @{ };
|
||||
'ParentConfig' = $null;
|
||||
'Menu' = 'Install-Icinga';
|
||||
'NextCommand' = '';
|
||||
'NextArguments' = $null;
|
||||
'HeaderSelection' = $null;
|
||||
'DisplayAdvanced' = $FALSE;
|
||||
'ShowAdvanced' = $FALSE;
|
||||
'ShowHelp' = $FALSE;
|
||||
'DeleteValues' = $FALSE;
|
||||
'HeaderPrint' = $FALSE;
|
||||
'JumpToSummary' = $FALSE;
|
||||
'Closing' = $FALSE;
|
||||
'AdminShell' = (Test-AdministrativeShell);
|
||||
'LastInput' = '';
|
||||
'LastNotice' = '';
|
||||
'LastError' = '';
|
||||
'HeaderPreview' = '';
|
||||
'DirectorSelfService' = $FALSE;
|
||||
'DirectorRegisteredHost' = $FALSE;
|
||||
'LastParent' = [System.Collections.ArrayList]@();
|
||||
'LastValues' = @();
|
||||
'Config' = @{ };
|
||||
'ConfigSwap' = @{ };
|
||||
'ParentConfig' = $null;
|
||||
'Menu' = 'Install-Icinga';
|
||||
'NextCommand' = '';
|
||||
'NextArguments' = $null;
|
||||
'HeaderSelection' = $null;
|
||||
'DisplayAdvanced' = $FALSE;
|
||||
'ShowAdvanced' = $FALSE;
|
||||
'ShowHelp' = $FALSE;
|
||||
'DeleteValues' = $FALSE;
|
||||
'HeaderPrint' = $FALSE;
|
||||
'JumpToSummary' = $FALSE;
|
||||
'Closing' = $FALSE;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ function Resolve-IcingaForWindowsManagementConsoleInstallationDirectorTemplate()
|
|||
Add-IcingaForWindowsInstallerConfigEntry -Selection 'c' -Values $DirectorUrl -OverwriteValues -OverwriteMenu 'Show-IcingaForWindowsManagementConsoleInstallationEnterDirectorUrl';
|
||||
Add-IcingaForWindowsInstallerConfigEntry -Selection 'c' -Values $SelfServiceKey -OverwriteValues -OverwriteMenu 'Show-IcingaForWindowsManagementConsoleInstallationEnterDirectorSelfServiceKey';
|
||||
} else {
|
||||
$Global:Icinga.InstallWizard.DirectorRegisteredHost = $TRUE;
|
||||
$HostnameType = Get-IcingaForWindowsInstallerStepSelection -InstallerStep 'Show-IcingaForWindowsInstallerMenuSelectHostname';
|
||||
$Hostname = '';
|
||||
|
||||
|
|
@ -76,7 +77,7 @@ function Resolve-IcingaForWindowsManagementConsoleInstallationDirectorTemplate()
|
|||
$ServiceUserName = $DirectorConfig.icinga_service_user;
|
||||
$AgentPackageSelection = 1; #Always use custom source
|
||||
$AgentPackageSource = $DirectorConfig.download_url;
|
||||
$AgentVersion = $DirectorConfig.release;
|
||||
$AgentVersion = $DirectorConfig.agent_version;
|
||||
$IcingaPort = $DirectorConfig.agent_listen_port;
|
||||
$GlobalZones = @();
|
||||
$IcingaParents = @();
|
||||
|
|
@ -174,6 +175,13 @@ function Resolve-IcingaForWindowsManagementConsoleInstallationDirectorTemplate()
|
|||
}
|
||||
|
||||
Disable-IcingaFrameworkConsoleOutput;
|
||||
|
||||
$HostRegisterSetting = (Get-IcingaForWindowsInstallerStepSelection -InstallerStep 'Show-IcingaForWindowsInstallerMenuSelectHostname');
|
||||
|
||||
if ($null -ne $HostRegisterSetting -And $HostnameSelection -ne $HostRegisterSetting) {
|
||||
$HostnameSelection = $HostRegisterSetting;
|
||||
}
|
||||
|
||||
Show-IcingaForWindowsInstallerMenuSelectHostname -DefaultInput $HostnameSelection -Automated;
|
||||
Add-IcingaForWindowsInstallationAdvancedEntries;
|
||||
Disable-IcingaFrameworkConsoleOutput;
|
||||
|
|
@ -194,6 +202,8 @@ function Resolve-IcingaForWindowsManagementConsoleInstallationDirectorTemplate()
|
|||
Show-IcingaForWindowsInstallerMenuSelectCertificate -Automated -DefaultInput '1';
|
||||
Show-IcingaForWindowsInstallerMenuEnterIcingaTicket -Automated -Value $Ticket;
|
||||
|
||||
Show-IcingaForWindowsInstallationMenuEnterIcingaAgentVersion -Automated -Value $AgentVersion;
|
||||
|
||||
Show-IcingaForWindowsManagementConsoleInstallationDirectorRegisterHost -Automated;
|
||||
|
||||
Enable-IcingaFrameworkConsoleOutput;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ function Show-IcingaForWindowsManagementConsoleInstallationEnterDirectorUrl()
|
|||
[switch]$Advanced = $FALSE
|
||||
);
|
||||
|
||||
$Global:Icinga.InstallWizard.DirectorSelfService = $TRUE;
|
||||
|
||||
Show-IcingaForWindowsInstallerMenu `
|
||||
-Header 'Please enter the URL pointing to your Icinga Director module:' `
|
||||
-Entries @(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
function Show-IcingaForWindowsInstallerMenuFinishInstaller()
|
||||
{
|
||||
|
||||
if ($global:Icinga.InstallWizard.DirectorSelfService -eq $TRUE -And $global:Icinga.InstallWizard.DirectorRegisteredHost -eq $FALSE) {
|
||||
$global:Icinga.InstallWizard.LastNotice = 'To install this host while using "Icinga Director Self-Service API", you need to register the host in the previous step first.';
|
||||
}
|
||||
|
||||
Show-IcingaForWindowsInstallerMenu `
|
||||
-Header 'How you do want to proceed:' `
|
||||
-Entries @(
|
||||
|
|
@ -7,7 +12,7 @@ function Show-IcingaForWindowsInstallerMenuFinishInstaller()
|
|||
'Caption' = 'Start installation';
|
||||
'Command' = 'Start-IcingaForWindowsInstallation';
|
||||
'Help' = 'Apply the just configured configuration and install components as selected';
|
||||
'Disabled' = (-Not ($global:Icinga.InstallWizard.AdminShell));
|
||||
'Disabled' = (-Not ($global:Icinga.InstallWizard.AdminShell) -Or ($global:Icinga.InstallWizard.DirectorSelfService -eq $TRUE -And $global:Icinga.InstallWizard.DirectorRegisteredHost -eq $FALSE));
|
||||
'Action' = @{
|
||||
'Command' = 'Clear-IcingaForWindowsManagementConsolePaginationCache';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ function Show-IcingaForWindowsInstallerMenuSelectConnection()
|
|||
[switch]$Advanced = $FALSE
|
||||
);
|
||||
|
||||
$Global:Icinga.InstallWizard.DirectorSelfService = $FALSE;
|
||||
|
||||
Show-IcingaForWindowsInstallerMenu `
|
||||
-Header 'How do you want to configure your local Icinga Agent?' `
|
||||
-Entries @(
|
||||
|
|
|
|||
Loading…
Reference in a new issue