Deprecated

Removed in 2.8

i

Reason:The win_msi module has a number of issues, the M(win_package) module is easier to maintain and use. | Alternative:Use M(win_package) instead.

ansible.builtin._win_msi (v2.7.18) — module

Installs and uninstalls Windows MSI files

| "added in version" 1.7 of ansible.builtin"

Authors: Matt Martz (@sivel)

deprecated | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.18

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install an MSI file
  win_msi:
    path: C:\7z920-x64.msi
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install an MSI, and wait for it to complete before continuing
  win_msi:
    path: C:\7z920-x64.msi
    wait: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Uninstall an MSI file
  win_msi:
    path: C:\7z920-x64.msi
    state: absent

Inputs

    
path:
    description:
    - File system path to the MSI file to install.
    required: true
    type: path

wait:
    default: 'no'
    description:
    - Specify whether to wait for install or uninstall to complete before continuing.
    type: bool
    version_added: '2.1'
    version_added_collection: ansible.builtin

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the MSI file should be installed or uninstalled.

creates:
    description:
    - Path to a file created by installing the MSI to prevent from attempting to reinstall
      the package on every run.
    type: path

removes:
    description:
    - Path to a file removed by uninstalling the MSI to prevent from attempting to re-uninstall
      the package on every run.
    type: path
    version_added: '2.4'
    version_added_collection: ansible.builtin

extra_args:
    description:
    - Additional arguments to pass to the msiexec.exe command.

Outputs

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