Using win_package with product installations that exit the installer immediately

Hi

I’ve been trying to use the win_package module to install Microsoft SQL Server Management Studio (SSMS). When the SSMS installation program (SSMS-Setup-ENU.exe) is executed at the command line, it exits immediately (though the installer continues to run as a Windows process). This behavior occurs even when I use the setup program switches ‘/install /quiet /norestart’.

Because of this behavior, the win_package instance never gets a completion signal, apparently, and win_package hangs for hours (I abort it with a CTRL-C).

Is this a known issue with win_package? Should I be using a different Ansible module to install products like SSMS?

Thanks!
tl

Hi

I found the solution to my problem, using the win_shell module instead of win_package, and using the ‘start /wait’ command:

  • name: Install Microsoft SQL Server Management Studio
    win_shell: ‘start /wait C:\Users\Administrator\Downloads\SSMS-Setup-ENU.exe /install /quiet /norestart’
    args:
    executable: cmd

Hope this helps someone else.
tl