win_command or win_shell error.

Hi,

I had tried running win_command , had this error

fatal: [sql test 2]: FAILED! => {“changed”: true, “cmd”: “C:xxxxx.4P1_x64.exe /s /v"/qn SILENT_MODE=1 /Li C:xxxxxxInstall.log INSTALLDIR=\"c:\xxxxx\pDrive\" SVCUSERNAME="domain\uname" SVCUSERPASSWORD=xxxxxxx SVCCONFIRMUSERPASSWORD=xxxxxx IGNORE_COMPMGMT_RUNNING=1 SDW_WEBSRV_TCP_PORT=808 SDW_WEBSRV_HTTP_PORT=4094 SDW_WEBSRV_HTTPS_PORT=4095 TRANSPORT_SETTING_ENABLE=1 DFM_SERVER_COMM_PRT_SELECTION=1 DFM_SERVER_COM_PORT=8088 DFM_SERVER_USERNAME="domain\uname" DFM_SERVER_PASSWORD=xxxxxx SDW_ESXSVR_ENABLE=0 SDW_SMVISVR_ENABLE=0"”, “delta”: “0:00:16.430989”, “end”: “2018-06-09 04:38:22.010828”, “msg”: “non-zero return code”, “rc”: 1618, “start”: “2018-06-09 04:38:05.579838”, “stderr”: “”, “stderr_lines”: , “stdout”: “”, “stdout_lines”: }

Playbook:

  • hosts: windows
    tasks:

  • name: install
    win_command: “command was in the error log. please refer above”

Have you tried using win_package? it can install .exe files as well as .msi

https://docs.ansible.com/ansible/latest/modules/win_package_module.html