win_psexec interactive example doesnt open interactive GUI

512 views
Skip to first unread message

daniya...@arctiq.ca

unread,
Aug 10, 2017, 11:39:20 AM8/10/17
to Ansible Project
Hi I am playing around with win_psexec to run an interactive install shield installer. When testing out the functionality from the examples in the module, the interactive GUI does not open upon execution. Heres my playbook from http://docs.ansible.com/ansible/latest/win_psexec_module.html :

---

- name: run win_psexec

  hosts: windows

  tasks:


     - name: run psexec

       win_psexec:

         command: regedit.exe

         interactive: yes

         system: yes


The playbook completes but I dont see the regedit GUI open on my windows host. The verbose is as follows:

TASK [run psexec] **********************************************************************************************************************************

task path: /etc/ansible/playbooks/install_app.yml:24

Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_psexec.ps1

<10.110.111.153> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 10.110.111.153

EXEC (via pipeline wrapper)

changed: [10.110.111.153] => {

    "changed": true, 

    "delta": "0:00:00.062500", 

    "end": "2017-08-10 03:32:26.804095", 

    "psexec_command": "psexec.exe -s -i -accepteula regedit.exe", 

    "rc": 0, 

    "start": "2017-08-10 03:32:26.741594", 

    "stderr": "Connecting to local system...\r\r\rStarting PSEXESVC service on local system...\r\r\rConnecting with PsExec service on WIN-O6II7H9L4U1...\r\r\rStarting regedit.exe on WIN-O6II7H9L4U1...\r\r\r\r\nregedit.exe exited on WIN-O6II7H9L4U1 with error code 0.\r\n", 

    "stderr_lines": [

        "Connecting to local system...", 

        "", 

        "", 

        "Starting PSEXESVC service on local system...", 

        "", 

        "", 

        "Connecting with PsExec service on WIN-O6II7H9L4U1...", 

        "", 

        "", 

        "Starting regedit.exe on WIN-O6II7H9L4U1...", 

        "", 

        "", 

        "", 

        "regedit.exe exited on WIN-O6II7H9L4U1 with error code 0."

    ], 

    "stdout": "\r\nPsExec v2.2 - Execute processes remotely\r\nCopyright (C) 2001-2016 Mark Russinovich\r\nSysinternals - www.sysinternals.com\r\n\r\n", 

    "stdout_lines": [

        "", 

        "PsExec v2.2 - Execute processes remotely", 

        "Copyright (C) 2001-2016 Mark Russinovich", 

        "Sysinternals - www.sysinternals.com", 

        ""

    ]

}


What am I doing wrong here?
Reply all
Reply to author
Forward
0 new messages