icinga-powershell-framework icon indicating copy to clipboard operation
icinga-powershell-framework copied to clipboard

Update-Icinga command does nothing in case the component is currently not installed

Open log1-c opened this issue 1 year ago • 0 comments

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. image

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:

  1. Produce some form of output that the user can work with like "Can't update <package> because it is not installed" or
  2. Install the package in the desired (or latest) version by calling the Install-IcingaComponent cmdlet.

log1-c avatar May 03 '24 07:05 log1-c