Using win_package with product installations that exit the installer immediately

141 views
Skip to first unread message

Terry Lemons

unread,
Jul 5, 2023, 1:23:13 PM7/5/23
to Ansible Project
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

Terry Lemons

unread,
Jul 17, 2023, 9:40:38 AM7/17/23
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages