icinga-powershell-framework
icinga-powershell-framework copied to clipboard
Update-Icinga command does nothing in case the component is currently not installed
Hello.
I just stumbled upon this behavior. We install the framework and plugins from a powershell script called via ansible.
Looks like some time in the past the installation of the plugins package failed and some machines have the framework installed, but not the plugin package.
Running the script again then uses the Update-icinga cmdlet instead of Install-IcingaComponent. But this does not install the plugins package and also does not produce any output, that the package can't be updated/is not currently installed.
For comparison that same command run on an installed "framework" package
PS C:\Program Files\WindowsPowerShell\Modules> update-icinga -Name "framework" -Version "1.11.1"
[Notice]: The installed version "1.11.1" of component "framework" is identical or lower than the new version "1.11.1". Use "-Force" to install anyway
I would like to suggest one of the following:
- Produce some form of output that the user can work with like "Can't update
<package>because it is not installed" or - Install the package in the desired (or latest) version by calling the
Install-IcingaComponentcmdlet.