Enhancing win_msi capabilities

Hey,

I started to use ansible to deploy an msi packaged software on our windows servers.
While doing so, I came up with some ideas on how to improve the win_msi module.

  1. Allowing the option to insert a registry key and not only a filesystem path as a way to check if the msi is already installed.

  2. MSI are well known formats with an option to get their GUID from the file itself and then use it to check if the software is already installed without the need for further input from the user.

  3. Allow the option to specify a log level and a path.

I would like to get your input on these ideas and wouldn’t mind helping with writing the added code.

Shachaf

Hey Shachaf,

There is another module called win_package which can accept a GUID and use that to check the if an msi or Windows installer.exe is already installed.
You can use win_regedit or win_regmerge to write to the registry, and win_file, win_copy or win_template to write to the windows file system. Yes, it means having more steps in your playbook but I think that's okay as you can make reusable roles.
I think win_package will also let you pass extra arguments so you can specify log level and path like you would if you ran msiexec from a cmd window.

If you can spare some time to help with Windows support there are some modules which could do with being tested. Have a look at https://github.com/ansible/ansible-modules-extras/pulls and add windows to the filter, and see if there any modules there that look useful to you.

All the best,
Jon