DebugFactor.com | Forum

Win_package module for MSI in Ansible gets hung without any error messages

I am trying to install a package in the windows server using the ansible win_package module. But the task gets hung without any error message. Manual installation works fine.
The playbook is as below:

- name: Install APP
  win_package:
   path: "{{ repo }}/installer.msi"
   arguments:
    - KEY="{{ i_key }}"
    - AUTO="{{ auto_val }}"
   product_id: "{{ product_id }}"
   state: present

As per Ansible(2.5) documentation, this parameter can be a list of arguments and the module will escape the arguments as necessary,
it is recommended to use a string when dealing with MSI packages due to the unique escaping issues with msiexec.
So to fix the above issue, pass all the arguments in a single line as a string as shown below.

- name: Install APP
  win_package:
   path: "{{ repo }}/installer.msi"
   arguments: KEY="{{ key_val }}" AUTO="{{ auto_val }}"
   product_id: "{{ product_id }}"
   state: present