Need help with win_package [msi file with TRANSFORMS]

933 views
Skip to first unread message

Julien

unread,
Aug 8, 2018, 3:24:31 AM8/8/18
to Ansible Project
Hello,

I have some trouble with win_package module, i'm trying to install a msi package with a deployment file, so i've wrote this task:


- name:
  win_package:
     path: C:\tmp\The msi package.msi
     arguments:
     - /passive
     - TRANSFORMS='"Group Policy Deployment.mst"'
     state: present


The problem is that the Windows installer process always stay inactive



Someone's know the exact synthax for this task?

Best Regards
Julien.

J Hawkesworth

unread,
Aug 8, 2018, 4:41:46 AM8/8/18
to Ansible Project
Try putting all the arguments on one line perhaps?  I don't think 'arguments' takes a list, just a string:

- name:
  win_package:
     path: C:\tmp\The msi package.msi
     arguments: /passive TRANSFORMS='"Group Policy Deployment.mst"'
     state: present


MSIs seem to have different command line switches based on which installer technology they were created with.  If you can't find out from wherever you got the .msi from what the correct command line switches for an unattended installation.

You might need a full path (or relative path from the HOMEPATH of the user that ansible is running as) to the .mst file  as well.

Hope this helps

Jon

Julien

unread,
Aug 30, 2018, 8:41:11 AM8/30/18
to Ansible Project
Hi Jon and thank's for the reply,

I've tried to put all arguments in one line, but i have the same result, my playbook stay stuck :



The thing that i don't understand is the command with the same command (msiexec /i The msi package.msi /passive TRANSFORMS='"Group Policy Deployment.mst"') on powershell works fine

Have you got any other solutions?
Sorry for the late of the answer, i were on vacation

Best Regards,
Julien.

Julien

unread,
Aug 30, 2018, 8:52:07 AM8/30/18
to Ansible Project
Missed the " " on the command, here it is :

msiexec /i "C:\tmp\The msi package.msi" /passive TRANSFORMS='"Group Policy Deployment.mst"'

J Hawkesworth

unread,
Sep 4, 2018, 4:52:38 AM9/4/18
to Ansible Project
There's lots of ways msi installations can fail.

You can debug it a bit by passing the logging output switches in the arguments and then reviewing the logging from msi.

I would probably take a pragmatic approach and use `win_shell` to run msiexec, perhaps with the `creates` option to stop it from reattempting the installing if already installed.

Jon 
Reply all
Reply to author
Forward
0 new messages