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.
Best Answer
Additionally to Rob's answer, in order to distinguish 32-bit - 64-bit installations, here is my /srv/salt/file/base/win/repo-ng/Icinga2/init.sls example file:
/srv/salt/file/base/win/repo-ng/Icinga2 files:
Icinga2-v2.11.2-x86_64.msi
Icinga2-v2.11.2-x86.msi
Icinga2-v2.11.3-x86_64.msi
Icinga2-v2.11.3-x86.msi
Icinga2-v2.8.0-x86_64.msi
Icinga2-v2.8.0-x86.msi
init.sls