0

I am trying to install Icinga via salt on a Windows server 2012 R2.

I have created an icinga.sls file and stored it in /srv/salt/win/repo-ng.

File contents:

icinga:
  '2.4.7':
    full_name: 'Icinga2-v2.4.7'
    installer: 'salt://win/repo-ng/Icinga2-v2.4.7-x86.msi'
    uninstaller: 'http://packages.icinga.org/windows/Icinga2-v2.4.7-x86.msi
    install_flags: '/qn /norestart'
    uninstall_flags: '/qn /norestart'
    msiexec: True
    locale: en_US
    reboot: False

I have also copied the Icinga2-v2.4.7-x86.msi file to /srv/salt/win/repo-ng.

I run salt minion_name pkg.refresh_db

I see Icinga2-v2.4.7-x86.msi in C:\salt\var\cache\salt\minion\files\base\win\repo-ng on the server 2012 PC.

when I run salt minion_name pkg.install icinga I get the following returned and when I check my server 2012 PC icinga is not installed:

_comment:

        Software not found in the registry.
        Could be a problem with the Software
        definition file. Verify the full_name
        and the version match the registry exactly.
        Failed after 10 tries.

Can someone advise what I am doing wrong?

I have tested installing 7-zip from the included repository and that works fine.

Another interesting thing is I have another 2012 server where I had manually installed the icinga application previously - I uninstalled it and tried installing it with salt and it did install but also gave the same error but install worked correctly.

I have also tried using the 64 bit version of Icinga (Icinga2-v2.4.7-x86_64.msi) and adjusting the icinga.sls file accordingly and get the same error.

Salt is an awesome system but I need to use it to install icinga on over 100 PCs so need an automated system - if I can install it another way using powershell or the like I am fine with that too but I want to install using salt.

Thank you in advance for your responses.

0

I got it working like this:

First I had to install this kb from windows update https://support.microsoft.com/en-us/kb/2999226

Then I modified the full_name option to match what shows up when the application is installed

full_name: Icinga 2

I was then able to install and uninstall Icinga without any problem.

One side note for anyone else with the same issue make sure you are using the same bit version of salt-minion as you are trying to install icinga - for example I had the 32-bit salt minion and trying to install the 64-bit icinga and it failed with the same error. Reinstalling the salt-minion as 64-bit and following the above instructions worked perfectly.

Even though I am answering my own question credit goes to David who helped me over on this post:

https://groups.google.com/forum/#!topic/salt-users/NstAv252vy0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.