Repository: ansible/ansible

Issue:
meta: reset_connection results in "IndexError: list index out of range" 
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE

 - Bug Report

##### COMPONENT NAME

meta module

##### ANSIBLE VERSION

```
ansible-playbook 2.3.1.0
  config file = 
  configured module search path = Default w/o overrides
  python version = 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
```

##### CONFIGURATION
No configuration.

##### OS / ENVIRONMENT
Ubuntu 16.04 with ansible pip installed, running in python3.5. Contacting a VM running CentOS 6

##### SUMMARY
Using `meta: reset_connection` works and does reset the connection, but then later on this IndexError ocurrs.

##### STEPS TO REPRODUCE
This playbook shows the problem:

```
- name: Ping them
  hosts: all
  tasks:
    - name: stuff
      debug:
        msg: Here is a message
    - name: reset conn
      meta: reset_connection
```

##### EXPECTED RESULTS
ansible-playbook should exit 0 without errors

##### ACTUAL RESULTS

~/tmp/inv has this content:
```
spamaps.org
```
My user has SSH agent access to spamaps.org.

```
$ ansible-playbook test.yml -i ~/tmp/inv -vvvvv
No config file found; using defaults
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.5/dist-packages/ansible/plugins/callback/__init__.py

PLAYBOOK: test.yml *************************************************************************************************************************************************************************************************
1 plays in test.yml

PLAY [Ping them] ***************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
Using module file /usr/local/lib/python3.5/dist-packages/ansible/modules/system/setup.py
<spamaps.org> ESTABLISH SSH CONNECTION FOR USER: None
<spamaps.org> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<spamaps.org> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<spamaps.org> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<spamaps.org> SSH: PlayContext set ssh_common_args: ()
<spamaps.org> SSH: PlayContext set ssh_extra_args: ()
<spamaps.org> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/80e720ccb6)
<spamaps.org> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/clint/.ansible/cp/80e720ccb6 spamaps.org '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<spamaps.org> (0, b'/home/clint\n', b'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/clint/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/clint/.ansible/cp/80e720ccb6" does not exist\r\ndebug2: resolving "spamaps.org" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to spamaps.org [184.105.137.237] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9959 ms remain after connect\r\ndebug1: identity file /home/clint/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/clint/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_5.3\r\ndebug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to spamaps.org:22 as \'clint\'\r\ndebug3: hostkeys_foreach: reading file "/home/clint/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /home/clint/.ssh/known_hosts:1\r\ndebug3: load_hostkeys: loaded 1 keys from spamaps.org\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c\r\ndebug2: host key algorithms: ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: MACs ctos: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: MACs stoc: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: compression ctos: none,zlib@openssh.com\r\ndebug2: compression stoc: none,zlib@openssh.com\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha256\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: aes128-ctr MAC: umac-64@openssh.com compression: zlib@openssh.com\r\ndebug1: kex: client->server cipher: aes128-ctr MAC: umac-64@openssh.com compression: zlib@openssh.com\r\ndebug3: send packet: type 34\r\ndebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug2: bits set: 1591/3072\r\ndebug3: send packet: type 32\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Server host key: ssh-rsa SHA256:mf9ThSOdsfxUY7DlJSmJL0XOOoKW2ub01frEsbNtVq4\r\ndebug3: hostkeys_foreach: reading file "/home/clint/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /home/clint/.ssh/known_hosts:1\r\ndebug3: load_hostkeys: loaded 1 keys from spamaps.org\r\ndebug3: hostkeys_foreach: reading file "/home/clint/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /home/clint/.ssh/known_hosts:2\r\ndebug3: load_hostkeys: loaded 1 keys from 184.105.137.237\r\ndebug1: Host \'spamaps.org\' is known and matches the RSA host key.\r\ndebug1: Found key in /home/clint/.ssh/known_hosts:1\r\ndebug2: bits set: 1560/3072\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: key: /home/clint/.ssh/id_rsa (0x55d803782db0), agent\r\ndebug2: key: clint@clint-ThinkPad-X250 (0x55d803784420), agent\r\ndebug2: key: noadmin@pyrrrat-root (0x55d8037840c0), agent\r\ndebug2: key: incoming-sftp (0x55d8037882a0), agent\r\ndebug2: key: /home/clint/.ssh/id_dsa ((nil))\r\ndebug2: key: /home/clint/.ssh/id_ecdsa ((nil))\r\ndebug2: key: /home/clint/.ssh/id_ed25519 ((nil))\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password\r\ndebug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup gssapi-with-mic\r\ndebug3: remaining preferred: gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled gssapi-with-mic\r\ndebug1: Next authentication method: gssapi-with-mic\r\ndebug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available\n\r\ndebug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available\n\r\ndebug1: Unspecified GSS failure.  Minor code may provide more information\n\n\r\ndebug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available\n\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup gssapi-keyex\r\ndebug3: remaining preferred: hostbased,publickey\r\ndebug3: authmethod_is_enabled gssapi-keyex\r\ndebug1: Next authentication method: gssapi-keyex\r\ndebug1: No valid Key exchange context\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/clint/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 60\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 279\r\ndebug2: input_userauth_pk_ok: fp SHA256:qzvF1wyt0Tt+T3Y8kIxwjaK68utj4IsxXzYvjBToPOI\r\ndebug3: sign_and_send_pubkey: RSA SHA256:qzvF1wyt0Tt+T3Y8kIxwjaK68utj4IsxXzYvjBToPOI\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to spamaps.org ([184.105.137.237]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /home/clint/.ansible/cp/80e720ccb6.rvVvdvdxZsu7NdlB\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 0: new [/home/clint/.ansible/cp/80e720ccb6]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 5\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 16635\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 6\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: process_mux_master_hello: channel 1 slave version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: process_mux_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 16637\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 100\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 7, stdout 8, stderr 9\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: process_mux_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 91\r\ndebug2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_US.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'echo ~ && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> closed\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close_write\r\ndebug2: channel 2: output drain -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: channel 1: close_read\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: close_write\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<spamaps.org> ESTABLISH SSH CONNECTION FOR USER: None
<spamaps.org> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<spamaps.org> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<spamaps.org> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<spamaps.org> SSH: PlayContext set ssh_common_args: ()
<spamaps.org> SSH: PlayContext set ssh_extra_args: ()
<spamaps.org> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/80e720ccb6)
<spamaps.org> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/clint/.ansible/cp/80e720ccb6 spamaps.org '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351 `" && echo ansible-tmp-1500415665.0875719-218494642853351="` echo /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351 `" ) && sleep 0'"'"''
<spamaps.org> (0, b'ansible-tmp-1500415665.0875719-218494642853351=/home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351\n', b'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/clint/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 16637\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<spamaps.org> PUT /tmp/tmpbaaj5_y1 TO /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/setup.py
<spamaps.org> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<spamaps.org> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<spamaps.org> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<spamaps.org> SSH: PlayContext set ssh_common_args: ()
<spamaps.org> SSH: PlayContext set sftp_extra_args: ()
<spamaps.org> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/80e720ccb6)
<spamaps.org> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/clint/.ansible/cp/80e720ccb6 '[spamaps.org]'
<spamaps.org> (0, b'sftp> put /tmp/tmpbaaj5_y1 /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/setup.py\n', b'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/clint/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 16637\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/clint size 0\r\ndebug3: Looking up /tmp/tmpbaaj5_y1\r\ndebug3: Sent message fd 3 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/setup.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:5343\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 5343 bytes at 98304\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<spamaps.org> ESTABLISH SSH CONNECTION FOR USER: None
<spamaps.org> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<spamaps.org> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<spamaps.org> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<spamaps.org> SSH: PlayContext set ssh_common_args: ()
<spamaps.org> SSH: PlayContext set ssh_extra_args: ()
<spamaps.org> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/80e720ccb6)
<spamaps.org> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/clint/.ansible/cp/80e720ccb6 spamaps.org '/bin/sh -c '"'"'chmod u+x /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/ /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/setup.py && sleep 0'"'"''
<spamaps.org> (0, b'', b'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/clint/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 16637\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<spamaps.org> ESTABLISH SSH CONNECTION FOR USER: None
<spamaps.org> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<spamaps.org> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<spamaps.org> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<spamaps.org> SSH: PlayContext set ssh_common_args: ()
<spamaps.org> SSH: PlayContext set ssh_extra_args: ()
<spamaps.org> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/80e720ccb6)
<spamaps.org> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/clint/.ansible/cp/80e720ccb6 -tt spamaps.org '/bin/sh -c '"'"'/usr/bin/python /home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/setup.py; rm -rf "/home/clint/.ansible/tmp/ansible-tmp-1500415665.0875719-218494642853351/" > /dev/null 2>&1 && sleep 0'"'"''
<spamaps.org> (0, b'/tmp/ansible_sKLfd8/ansible_modlib.zip/ansible/module_utils/facts.py:1019: DeprecationWarning: object.__new__() takes no parameters\r\n/tmp/ansible_sKLfd8/ansible_modlib.zip/ansible/module_utils/facts.py:2438: DeprecationWarning: object.__new__() takes no parameters\r\n/tmp/ansible_sKLfd8/ansible_modlib.zip/ansible/module_utils/facts.py:3342: DeprecationWarning: object.__new__() takes no parameters\r\n\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "changed": false, "ansible_facts": {"ansible_product_serial": "NA", "ansible_form_factor": "NA", "ansible_product_version": "NA", "ansible_fips": false, "ansible_service_mgr": "upstart", "ansible_user_id": "clint", "ansible_user_dir": "/home/clint", "ansible_memtotal_mb": 1459, "ansible_system_capabilities": [""], "ansible_distribution_version": "6.9", "ansible_domain": "srihosting.com", "ansible_date_time": {"weekday_number": "2", "iso8601_basic_short": "20170718T150754", "tz": "PDT", "weeknumber": "29", "hour": "15", "year": "2017", "minute": "07", "tz_offset": "-0700", "month": "07", "epoch": "1500415674", "iso8601_micro": "2017-07-18T22:07:54.378020Z", "weekday": "Tuesday", "time": "15:07:54", "date": "2017-07-18", "iso8601": "2017-07-18T22:07:54Z", "day": "18", "iso8601_basic": "20170718T150754377747", "second": "54"}, "ansible_real_user_id": 500, "ansible_processor_cores": 1, "ansible_virtualization_role": "guest", "ansible_dns": {"nameservers": ["8.8.8.8", "8.8.4.4"]}, "ansible_processor_vcpus": 1, "ansible_bios_version": "NA", "ansible_processor": ["GenuineIntel", "Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz"], "ansible_virtualization_type": "xen", "ansible_lo": {"features": {"tx_checksum_ipv4": "off [fixed]", "generic_receive_offload": "on", "tx_checksum_ipv6": "off [fixed]", "tx_scatter_gather_fraglist": "on [fixed]", "tx_checksum_unneeded": "off [fixed]", "highdma": "on [fixed]", "tx_lockless": "on [fixed]", "tx_tcp_ecn_segmentation": "on", "tx_gso_robust": "off [fixed]", "tx_checksumming": "on", "vlan_challenged": "on [fixed]", "loopback": "on [fixed]", "fcoe_mtu": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "large_receive_offload": "off [fixed]", "tx_scatter_gather": "on [fixed]", "rx_checksumming": "on [fixed]", "tx_tcp_segmentation": "on", "netns_local": "on [fixed]", "generic_segmentation_offload": "on", "tx_udp_tnl_segmentation": "off [fixed]", "tcp_segmentation_offload": "on", "rx_vlan_offload": "off [fixed]", "ntuple_filters": "off [fixed]", "tx_vlan_offload": "off [fixed]", "tx_tcp6_segmentation": "on", "udp_fragmentation_offload": "on", "scatter_gather": "on", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_ip_generic": "on [fixed]", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off [fixed]", "receive_hashing": "off [fixed]", "tx_gre_segmentation": "off [fixed]"}, "mtu": 65536, "device": "lo", "promisc": false, "ipv4": {"broadcast": "host", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}, "ipv6": [{"scope": "host", "prefix": "128", "address": "::1"}], "active": true, "type": "loopback"}, "ansible_userspace_bits": "64", "ansible_architecture": "x86_64", "ansible_default_ipv4": {"macaddress": "00:16:3e:1f:ea:f2", "network": "184.105.137.192", "mtu": 1500, "broadcast": "184.105.137.255", "alias": "eth0", "netmask": "255.255.255.192", "address": "184.105.137.237", "interface": "eth0", "type": "ether", "gateway": "184.105.137.193"}, "ansible_swapfree_mb": 0, "ansible_default_ipv6": {}, "ansible_distribution_release": "Final", "ansible_system_vendor": "NA", "ansible_apparmor": {"status": "disabled"}, "ansible_cmdline": {"LANG": "en_US.UTF-8", "rd_NO_LUKS": true, "ro": true, "console": "hvc0", "rd_NO_MD": true, "quiet": true, "rd_LVM_LV": "XenVolGroup/lv_root", "rhgb": true, "KEYTABLE": "us", "crashkernel": "auto", "SYSFONT": "latarcyrheb-sun16", "root": "/dev/mapper/XenVolGroup-lv_root", "rd_NO_DM": true}, "ansible_effective_user_id": 500, "ansible_mounts": [{"uuid": "N/A", "size_total": 31602700288, "mount": "/", "size_available": 5297983488, "fstype": "ext3", "device": "/dev/mapper/XenVolGroup-lv_root", "options": "rw"}, {"uuid": "N/A", "size_total": 101529600, "mount": "/boot", "size_available": 30937088, "fstype": "ext3", "device": "/dev/xvda1", "options": "rw"}], "ansible_selinux": {"status": "disabled"}, "ansible_os_family": "RedHat", "ansible_userspace_architecture": "x86_64", "ansible_product_uuid": "NA", "ansible_product_name": "NA", "ansible_pkg_mgr": "yum", "ansible_memfree_mb": 60, "ansible_devices": {"xvda": {"scheduler_mode": "cfq", "rotational": "0", "vendor": null, "sectors": "94371840", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": null, "partitions": {"xvda1": {"sectorsize": 512, "uuid": "8703c7d1-ebe2-4c8b-8205-4a3ea341e3ce", "sectors": "204800", "start": "2048", "holders": [], "size": "100.00 MB"}, "xvda2": {"sectorsize": 512, "uuid": null, "sectors": "62703692", "start": "206848", "holders": ["XenVolGroup-lv_root"], "size": "29.90 GB"}}, "holders": [], "size": "45.00 GB"}}, "ansible_user_uid": 500, "ansible_memory_mb": {"real": {"total": 1459, "used": 1399, "free": 60}, "swap": {"cached": 0, "total": 0, "free": 0, "used": 0}, "nocache": {"used": 594, "free": 865}}, "ansible_distribution": "CentOS", "ansible_env": {"LANG": "en_US.UTF-8", "TERM": "xterm-256color", "SHELL": "/bin/bash", "SHLVL": "2", "SSH_TTY": "/dev/pts/3", "G_BROKEN_FILENAMES": "1", "SSH_CLIENT": "172.250.7.7 45782 22", "LESSOPEN": "||/usr/bin/lesspipe.sh %s", "PWD": "/home/clint", "CVS_RSH": "ssh", "LOGNAME": "clint", "USER": "clint", "MANPATH": "/usr/lib/courier-imap/man:", "PATH": "/usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin", "MAIL": "/var/mail/clint", "LS_COLORS": "rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lz=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.bz=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.rar=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:", "HOME": "/home/clint", "_": "/usr/bin/python", "SSH_CONNECTION": "172.250.7.7 45782 184.105.137.237 22"}, "ansible_distribution_major_version": "6", "module_setup": true, "ansible_processor_count": 1, "ansible_hostname": "xencbyrum2", "ansible_effective_group_id": 500, "ansible_swaptotal_mb": 0, "ansible_lsb": {"release": "6.9", "major_release": "6", "codename": "Final", "id": "CentOS", "description": "CentOS release 6.9 (Final)"}, "ansible_real_group_id": 500, "ansible_bios_date": "NA", "ansible_all_ipv6_addresses": ["fe80::216:3eff:fe1f:eaf2"], "ansible_interfaces": ["lo", "eth0"], "ansible_uptime_seconds": 14524108, "ansible_machine_id": "8b82be7fd3ea5ff44379c1b60000001a", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAABIwAAAQEAyLKP0RyBHL4TLU5NlD3nzPBa6D/PVvCsgmNASkzFrqKKe52XrREnsI26JUnaSYIR9L7NOrshd99kxcYnxXpV/pLBXgzdae3r4vTDNDUwzAq3vlQXmSw18IN1REe1cGg8E8OawcOxuNDn69Lbll4e4vGriIyWgwTifqjAL2JPd+Orw6DpRYMG3MvDW7CUnF7wr6H1kC4AiviGtckmtFwP+hDTe8Q1C88pq1rfnasdjm9PwWbrJoJmqUq5m3aT3WwW27NJXz6QSgTnAF7UD9EZfU5/ixBdW2S1FcAP28pEQ3BoFRH0LuuadUdN6cLPCNPV07aTZ79Z3vH5KWRopjqLtQ==", "ansible_gather_subset": ["hardware", "network", "virtual"], "ansible_user_gecos": "Clint Byrum", "ansible_system_capabilities_enforced": "True", "ansible_python": {"executable": "/usr/bin/python", "version": {"micro": 6, "major": 2, "releaselevel": "final", "serial": 0, "minor": 6}, "type": "CPython", "has_sslcontext": false, "version_info": [2, 6, 6, "final", 0]}, "ansible_kernel": "2.6.32-642.11.1.el6.x86_64", "ansible_processor_threads_per_core": 1, "ansible_fqdn": "xencbyrum2.srihosting.com", "ansible_user_gid": 500, "ansible_eth0": {"macaddress": "00:16:3e:1f:ea:f2", "features": {"tx_checksum_ipv4": "on", "generic_receive_offload": "on", "tx_checksum_ipv6": "off", "tx_scatter_gather_fraglist": "off [fixed]", "tx_checksum_unneeded": "off", "highdma": "off [fixed]", "tx_lockless": "off [fixed]", "tx_tcp_ecn_segmentation": "off", "tx_gso_robust": "on [fixed]", "tx_checksumming": "on", "vlan_challenged": "off [fixed]", "loopback": "off [fixed]", "fcoe_mtu": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "large_receive_offload": "off [fixed]", "tx_scatter_gather": "on", "rx_checksumming": "off [fixed]", "tx_tcp_segmentation": "on", "netns_local": "off [fixed]", "generic_segmentation_offload": "on", "tx_udp_tnl_segmentation": "off [fixed]", "tcp_segmentation_offload": "on", "rx_vlan_offload": "off [fixed]", "ntuple_filters": "off [fixed]", "tx_vlan_offload": "off [fixed]", "tx_tcp6_segmentation": "off", "udp_fragmentation_offload": "off [fixed]", "scatter_gather": "on", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_ip_generic": "off", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off [fixed]", "receive_hashing": "off [fixed]", "tx_gre_segmentation": "off [fixed]"}, "pciid": "vif-0", "module": "xen_netfront", "mtu": 1500, "device": "eth0", "promisc": false, "ipv4": {"broadcast": "184.105.137.255", "netmask": "255.255.255.192", "network": "184.105.137.192", "address": "184.105.137.237"}, "ipv6": [{"scope": "link", "prefix": "64", "address": "fe80::216:3eff:fe1f:eaf2"}], "active": true, "type": "ether"}, "ansible_nodename": "xencbyrum2.srihosting.com", "ansible_system": "Linux", "ansible_user_shell": "/bin/bash", "ansible_machine": "x86_64", "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBAPOlY3CbmfqEerypkFdWJO6fNaz7c4HH4UCAeVQxVrpo+PoSqtTJHhB24gOmxicCcmkXgb6KJP16tWcpV47dfLCfNY078k24yFBRtAfIIXhZSGyXjPdcp3BTTQVkqRyR1ToS572FAgzi6it6wUc0psSXdaOJXdRqtqieFQUnR3Q5AAAAFQDDLXxM4aIcL5sYlSFRbLwCsIGAXQAAAIBv71rbqG53O2b9MKZ0MIGp2vDT+0H32SycdeoWk0YqTqOesjQaKz2OHEdFqcYf0nm8zLyiIuNTR0MLBq1mHt2QUbXi+T4pAxnseV5wLclgZY5Hydg6F5v86ixQjV9W5/unlL4MKcmLL62hGnJIykVHPXhJ2elPykwp3Oj0eurfOwAAAIEA7981Kzo+/PfYYoI2clhvjtxAEolpCMv/EpJ3N504LZ79K4ADrIS7PhI9lb8Bne6UqZo+9eoKm5JAnzvfyArb2jUOrz8BSU4Q0KVZnCaBkz0TtuFyKHcWpmasSIimAzckAtF+LRCzbz/8hJg9/1Gbp8Zq2HQl5O3Hxde+Ry9zdFc=", "ansible_all_ipv4_addresses": ["184.105.137.237"], "ansible_python_version": "2.6.6"}}\r\n', b'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016\r\ndebug1: Reading configuration data /home/clint/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 16637\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to spamaps.org closed.\r\n')
ok: [spamaps.org]
META: ran handlers

TASK [stuff] *******************************************************************************************************************************************************************************************************
task path: /home/clint/test.yml:4
ok: [spamaps.org] => {
    "msg": "Here is a message"
}
SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
SSH: PlayContext set ssh_common_args: ()
SSH: PlayContext set ssh_extra_args: ()
SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/clint/.ansible/cp/276d6f8b70)
ERROR! Unexpected Exception: list index out of range
the full traceback was:

Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 109, in <module>
    exit_code = cli.run()
  File "/usr/local/lib/python3.5/dist-packages/ansible/cli/playbook.py", line 154, in run
    results = pbex.run()
  File "/usr/local/lib/python3.5/dist-packages/ansible/executor/playbook_executor.py", line 153, in run
    result = self._tqm.run(play=play)
  File "/usr/local/lib/python3.5/dist-packages/ansible/executor/task_queue_manager.py", line 284, in run
    play_return = strategy.run(iterator, play_context)
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/strategy/linear.py", line 221, in run
    results.extend(self._execute_meta(task, play_context, iterator, host))
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/strategy/__init__.py", line 905, in _execute_meta
    connection.reset()
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/connection/ssh.py", line 816, in reset
    p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1448, in _execute_child
    executable = args[0]
IndexError: list index out of range
$
```



Discussion:
I just tried with devel, still present as of 913a8f864a86afdf0a976228267fadd3b4605b17

```
Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 106, in <module>
    exit_code = cli.run()
  File "/usr/local/lib/python3.5/dist-packages/ansible/cli/playbook.py", line 130, in run
    results = pbex.run()
  File "/usr/local/lib/python3.5/dist-packages/ansible/executor/playbook_executor.py", line 153, in run
    result = self._tqm.run(play=play)
  File "/usr/local/lib/python3.5/dist-packages/ansible/executor/task_queue_manager.py", line 285, in run
    play_return = strategy.run(iterator, play_context)
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/strategy/linear.py", line 235, in run
    results.extend(self._execute_meta(task, play_context, iterator, host))
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/strategy/__init__.py", line 892, in _execute_meta
    connection.reset()
  File "/usr/local/lib/python3.5/dist-packages/ansible/plugins/connection/ssh.py", line 898, in reset
    p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1448, in _execute_child
    executable = args[0]
IndexError: list index out of range
```

```
ansible-playbook 2.4.0
  config file = None
  configured module search path = ['/home/clint/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
```
BTW in poking around a bit, this is happening because subprocess doesn't properly handle the map object in python3, which may itself be a bug in subprocess. Either way, wrapping the map function in list() gets rid of the explosive unhandled exception.

Resolving patch:
diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py
--- a/lib/ansible/plugins/connection/ssh.py
+++ b/lib/ansible/plugins/connection/ssh.py
@@ -891,7 +891,7 @@ def fetch_file(self, in_path, out_path):
 
     def reset(self):
         # If we have a persistent ssh connection (ControlPersist), we can ask it to stop listening.
-        cmd = map(to_bytes, self._build_command(self._play_context.ssh_executable, '-O', 'stop', self.host))
+        cmd = self._build_command(self._play_context.ssh_executable, '-O', 'stop', self.host)
         controlpersist, controlpath = self._persistence_controls(cmd)
         if controlpersist:
             display.vvv(u'sending stop: %s' % cmd)


Test patch: