win_msi - Installs and uninstalls Windows MSI files

New in version 1.7.

DEPRECATED

In 2.4 and will be removed in 2.8, use win_package instead.

Synopsis

  • Installs or uninstalls a Windows MSI file that is already located on the target server.

Options

parameter required default choices comments
creates
no
Path to a file created by installing the MSI to prevent from attempting to reinstall the package on every run.
extra_args
no
Additional arguments to pass to the msiexec.exe command.
path
yes
File system path to the MSI file to install
removes
(added in 2.4)
no
Path to a file removed by uninstalling the MSI to prevent from attempting to re-uninstall the package on every run.
state
no present
  • absent
  • present
Whether the MSI file should be installed or uninstalled.
wait
(added in 2.1)
no no
  • yes
  • no
Specify whether to wait for install or uninstall to complete before continuing.

Examples

- name: Install an MSI file
  win_msi:
    path: C:\7z920-x64.msi

- name: Install an MSI, and wait for it to complete before continuing
  win_msi:
    path: C:\7z920-x64.msi
    wait: yes

- name: Uninstall an MSI file
  win_msi:
    path: C:\7z920-x64.msi
    state: absent

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
log
The logged output from the installer
always string N/A

Notes

Note

  • This module is not idempotent and will report a change every time. Use the creates and removes options to your advantage.
  • Please look into win_package instead, this package will be deprecated in the future.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/win_msi_module.html