[Ansible to Windows] IndexError: tuple index out of range

990 views
Skip to first unread message

Zhenkai Jiang

unread,
Aug 22, 2014, 2:25:31 AM8/22/14
to ansible...@googlegroups.com
Hi All,

I am a very newbie to Ansible.  I am running Ansible 1.8-dev from source (Tried 1.7.1 from pip as well)

I wanted to control windows machine So I setuped the workstation (Centos 6.3) followed steps on http://docs.ansible.com/intro_windows.html

Below is what I got:

[root@ansible-test-1 ~]# ansible windows  -i ~/hosts  -m win_ping --ask-vault-pass -vvvv
Vault password: 
<15.126.222.251> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 15.126.222.251
<15.126.222.251> WINRM CONNECT: transport=plaintext endpoint=https://15.126.222.251:5986/wsman
15.126.222.251 | FAILED => Traceback (most recent call last):
  File "/root/ansible/lib/ansible/runner/__init__.py", line 566, in _executor
    exec_rc = self._executor_internal(host, new_stdin)
  File "/root/ansible/lib/ansible/runner/__init__.py", line 678, in _executor_internal
    return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
  File "/root/ansible/lib/ansible/runner/__init__.py", line 849, in _executor_internal_inner
    conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file)
  File "/root/ansible/lib/ansible/runner/connection.py", line 44, in connect
    self.active = conn.connect()
  File "/root/ansible/lib/ansible/runner/connection_plugins/winrm.py", line 132, in connect
    self.protocol = self._winrm_connect()
  File "/root/ansible/lib/ansible/runner/connection_plugins/winrm.py", line 90, in _winrm_connect
    err_msg = str(exc.args[0])
IndexError: tuple index out of range


Any advices? Really appreciated that.

Avinash Singh

unread,
Aug 22, 2014, 9:25:15 AM8/22/14
to ansible...@googlegroups.com
I am experiencing the same issue.

Matt Martz

unread,
Aug 22, 2014, 9:55:11 AM8/22/14
to ansible...@googlegroups.com
This is probably the same issue as what is mentioned at https://github.com/ansible/ansible/issues/8720

However, without the traceback in the issue I am unsure.

The specific traceback that you are seeing, is masking the real issue.  The real issue likely occurred earlier causing the initial WinRMTransportError exception to be raised.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c41741d2-1c5d-4a10-8888-29a05cde7255%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
ma...@sivel.net
http://sivel.net/

Joe G

unread,
Aug 22, 2014, 11:05:39 AM8/22/14
to ansible...@googlegroups.com
I found this issue started happening to me after this update of pywinrm: https://github.com/diyan/pywinrm/tree/7ab74a4b8fbeb2af707c5628703c485f8d14238d

So, I started using an earlier version:

Joe

Michael DeHaan

unread,
Aug 22, 2014, 11:55:32 AM8/22/14
to ansible...@googlegroups.com, Chris Church
Any thoughts on this Chris?




Zhenkai Jiang

unread,
Aug 24, 2014, 10:27:09 PM8/24/14
to ansible...@googlegroups.com
uninstalling pywinrm & installing old version do the trick. problem solved. Thanks.

Chris Church

unread,
Aug 26, 2014, 8:23:30 AM8/26/14
to ansible...@googlegroups.com
The IndexError traceback was fixed by https://github.com/ansible/ansible/commit/07f12539eee2faac5fe831cd31f1f0a5d3e7e661, and I just pushed a fix for running windows modules from playbooks (https://github.com/ansible/ansible/commit/57dee4545b3c34d1e66943def8d5e45ee95d66bd).

The winrm integration tests are working for me now using ansible@devel and pywinrm@master.


Michael DeHaan

unread,
Aug 26, 2014, 8:30:36 AM8/26/14
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages