Repository: ansible/ansible

Issue:
reset_connection targets wrong ControlPath
##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
meta: reset_connection

##### ANSIBLE VERSION
```
ansible 2.3.1.0
  config file = /home/theuser/.ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

```

##### CONFIGURATION
none
```
$ cat ~/.ansible.cfg
[defaults]
nocolor = no
force_color = 1
retry_files_enabled = True
retry_files_save_path = ~/.ansible-retry
```

##### OS / ENVIRONMENT
CentOS 7
Anaconda2 4.4.0 Python 2.7

##### SUMMARY
`- meta: reset_connection` doesn't reset connection as wrong ControlPath is used.

##### STEPS TO REPRODUCE
Following short play

```yaml
- hosts: all
  tasks:
    - ping:
    - meta: reset_connection
```

##### EXPECTED RESULTS
All ControlPath deleted and ssh connections stopped

##### ACTUAL RESULTS
ssh connection still intact
```
$ ps aux | grep 0c82300404
theuser  121734  0.0  0.0 178048  1856 ?        Ss   20:21   0:00 ssh: /mmfs1/home/justin/.ansible/cp/0c82300404 [mux]
```
```
Using /home/theuser/.ansible.cfg as config file
SSH password:
Loading callback plugin default of type stdout, v2.0 from /home/justin/anaconda2/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc

PLAYBOOK: foo.yml ********************************************************************************************************************************************************************************
1 plays in foo.yml

PLAY [all] ***************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************
Using module file /home/justin/anaconda2/lib/python2.7/site-packages/ansible/modules/system/setup.py
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.96.70.188> (0, '/home/centos\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/mmfs1/home/justin/.ansible/cp/0c82300404" does not exist\r\ndebug2: ssh_connect: needpriv 0\r\ndebug1: Connecting to 10.96.70.188 [10.96.70.188] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug3: Incorrect RSA1 identifier\r\ndebug3: Could not load "/home/theuser/.ssh/id_rsa" as a RSA1 public key\r\ndebug1: identity file /home/theuser/.ssh/id_rsa type 1\r\ndebug1: identity file /home/theuser/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /home/theuser/.ssh/id_dsa type -1\r\ndebug1: identity file /home/theuser/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /home/theuser/.ssh/id_ecdsa type -1\r\ndebug1: identity file /home/theuser/.ssh/id_ecdsa-cert type -1\r\ndebug3: Incorrect RSA1 identifier\r\ndebug3: Could not load "/home/theuser/.ssh/id_ed25519" as a RSA1 public key\r\ndebug1: identity file /home/theuser/.ssh/id_ed25519 type 4\r\ndebug1: identity file /home/theuser/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_6.6.1\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1\r\ndebug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug3: load_hostkeys: loading entries for host "10.96.70.188" from file "/home/theuser/.ssh/known_hosts"\r\ndebug3: load_hostkeys: found key type ED25519 in file /home/theuser/.ssh/known_hosts:82\r\ndebug3: load_hostkeys: loaded 1 keys\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-ed25519-cert-v01@openssh.com,ssh-ed25519\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: kex_parse_kexinit: 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,diffie-hellman-group1-sha1\r\ndebug2: kex_parse_kexinit: ssh-ed25519-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256\r\ndebug2: kex_parse_kexinit: ssh-rsa,ssh-ed25519\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr\r\ndebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr\r\ndebug2: kex_parse_kexinit: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com\r\ndebug2: kex_parse_kexinit: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: mac_setup: setup umac-128-etm@openssh.com\r\ndebug1: kex: server->client aes128-ctr umac-128-etm@openssh.com zlib@openssh.com\r\ndebug2: mac_setup: setup umac-128-etm@openssh.com\r\ndebug1: kex: client->server aes128-ctr umac-128-etm@openssh.com zlib@openssh.com\r\ndebug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16\r\ndebug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16\r\ndebug1: sending SSH2_MSG_KEX_ECDH_INIT\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ED25519 56:22:b4:c1:8f:df:a0:81:f9:14:d8:f5:ae:8d:b7:bf\r\ndebug3: load_hostkeys: loading entries for host "10.96.70.188" from file "/home/theuser/.ssh/known_hosts"\r\ndebug3: load_hostkeys: found key type ED25519 in file /home/theuser/.ssh/known_hosts:82\r\ndebug3: load_hostkeys: loaded 1 keys\r\ndebug1: Host \'10.96.70.188\' is known and matches the ED25519 host key.\r\ndebug1: Found key in /home/theuser/.ssh/known_hosts:82\r\ndebug1: ssh_ed25519_verify: signature correct\r\ndebug2: kex_derive_keys\r\ndebug2: set_newkeys: mode 1\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug2: set_newkeys: mode 0\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: SSH2_MSG_SERVICE_REQUEST sent\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug2: key: /home/theuser/.ssh/id_rsa (0x7f556cc9fae0),\r\ndebug2: key: /home/theuser/.ssh/id_ed25519 (0x7f556cc9fb30),\r\ndebug2: key: /home/theuser/.ssh/id_scp (0x7f556cca0030),\r\ndebug2: key: /home/theuser/.ssh/id_scp_rsa (0x7f556cc9ff00),\r\ndebug2: key: /home/theuser/.ssh/id_dsa ((nil)),\r\ndebug2: key: /home/theuser/.ssh/id_ecdsa ((nil)),\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\r\ndebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: keyboard-interactive,password\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/theuser/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Offering ED25519 public key: /home/theuser/.ssh/id_ed25519\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Offering ED25519 public key: /home/theuser/.ssh/id_scp\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Offering RSA public key: /home/theuser/.ssh/id_scp_rsa\r\ndebug3: send_pubkey_test\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug1: Trying private key: /home/theuser/.ssh/id_dsa\r\ndebug3: no such identity: /home/theuser/.ssh/id_dsa: No such file or directory\r\ndebug1: Trying private key: /home/theuser/.ssh/id_ecdsa\r\ndebug3: no such identity: /home/theuser/.ssh/id_ecdsa: No such file or directory\r\ndebug2: we did not send a packet, disable method\r\ndebug3: authmethod_lookup password\r\ndebug3: remaining preferred: ,password\r\ndebug3: authmethod_is_enabled password\r\ndebug1: Next authentication method: password\r\ndebug3: packet_send2: adding 64 (len 53 padlen 11 extra_pad 64)\r\ndebug2: we sent a password packet, wait for reply\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (password).\r\nAuthenticated to 10.96.70.188 ([10.96.70.188]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /mmfs1/home/justin/.ansible/cp/0c82300404.kvMyVnPEy4c5ZkHD\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/mmfs1/home/justin/.ansible/cp/0c82300404]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 150621\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\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 = 150623\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 91\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 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\ndebug2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en_GB.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug1: Sending command: /bin/sh -c \'echo ~ && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\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\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\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\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\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\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\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: mux_client_read_packet: read header failed: Broken pipe\r\ndebug3: channel 1: status: The following connections are open:\r\n\r\ndebug2: Received exit status from master 0\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\n')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338 `" && echo ansible-tmp-1501529025.09-183069930459338="` echo /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338 `" ) && sleep 0'"'"''
<10.96.70.188> (0, 'ansible-tmp-1501529025.09-183069930459338=/home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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')
<10.96.70.188> PUT /tmp/tmpxU8QKX TO /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/setup.py
<10.96.70.188> SSH: EXEC sshpass -d13 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 '[10.96.70.188]'
<10.96.70.188> (0, 'sftp> put /tmp/tmpxU8QKX /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/setup.py\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 6 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/centos size 0\r\ndebug3: Looking up /tmp/tmpxU8QKX\r\ndebug3: Sent message fd 6 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/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/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:5344\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 5344 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')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'chmod u+x /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/ /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/setup.py && sleep 0'"'"''
<10.96.70.188> (0, '', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 -tt 10.96.70.188 '/bin/sh -c '"'"'/usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/setup.py; rm -rf "/home/centos/.ansible/tmp/ansible-tmp-1501529025.09-183069930459338/" > /dev/null 2>&1 && sleep 0'"'"''
<10.96.70.188> (0, '\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": "Rack Mount Chassis", "ansible_product_version": "NA", "ansible_fips": false, "ansible_service_mgr": "systemd", "ansible_user_id": "centos", "ansible_user_dir": "/home/centos", "ansible_memtotal_mb": 257848, "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNIvj0M3/BLaBh0zcvHFJTCBipEn5OHfltHaJvwpLL4OQLiUrunZcSha+0lkrXDnmTtEi+GDeAnjsGm3OwmTL74=", "ansible_distribution_version": "7.3.1611", "ansible_domain": "", "ansible_virtualization_type": "lxc", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIIIqpGCoy0NEIV15/TNHX3Gk10Xvaqa5pwzBpbCUWak6", "ansible_processor_cores": 12, "ansible_virtualization_role": "guest", "ansible_dns": {"ansible_processor_vcpus": 24, "ansible_bios_version": "2.3.4", "ansible_processor": ["GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz"], "ansible_date_time": {"weekday_number": "1", "iso8601_basic_short": "20170731T192411", "tz": "UTC", "weeknumber": "31", "hour": "19", "year": "2017", "minute": "24", "tz_offset": "+0000", "month": "07", "epoch": "1501529051", "iso8601_micro": "2017-07-31T19:24:11.928198Z", "weekday": "Monday", "time": "19:24:11", "date": "2017-07-31", "iso8601": "2017-07-31T19:24:11Z", "day": "31", "iso8601_basic": "20170731T192411928137", "second": "11"}, "ansible_lo": {"features": {}, "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_real_user_id": 1001, "ansible_default_ipv4": {"macaddress": "00:16:3e:3a:8d:51", "network": "10.96.64.0", "mtu": 1500, "broadcast": "10.96.71.255", "alias": "brprim", "netmask": "255.255.248.0", "address": "10.96.70.188", "interface": "brprim", "type": "ether", "gateway": "10.96.64.1"}, "ansible_swapfree_mb": 30515, "ansible_default_ipv6": {}, "ansible_distribution_release": "Core", "ansible_system_vendor": "Dell Inc.", "ansible_apparmor": {"status": "enabled"}, "ansible_cmdline": {"BOOT_IMAGE": "/vmlinuz-4.4.0-62-generic", "ro": true, "root": "/dev/mapper/vg0-root"}, "ansible_effective_user_id": 1001, "ansible_mounts": [{"uuid": "N/A", "size_total": 274752909312, "mount": "/mnt/backup", "size_available": 274718990336, "fstype": "xfs", "device": "/dev/mapper/vg0-backup", "options": "rw,relatime,attr2,inode64,noquota"}, {"uuid": "N/A", "size_total": 549505814528, "mount": "/mnt/data", "size_available": 303447937024, "fstype": "xfs", "device": "/dev/mapper/vg0-data", "options": "rw,relatime,attr2,inode64,noquota"}, {"uuid": "N/A", "size_total": 274752909312, "mount": "/mnt/shared", "size_available": 274719121408, "fstype": "xfs", "device": "/dev/mapper/vg0-shared", "options": "rw,relatime,attr2,inode64,noquota"}], "ansible_selinux": {"status": "disabled"}, "ansible_os_family": "RedHat", "ansible_userspace_architecture": "x86_64", "ansible_product_uuid": "NA", "ansible_product_name": "PowerEdge R630", "ansible_pkg_mgr": "yum", "ansible_memfree_mb": 257766, "ansible_devices": {"sdf": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "iDRAC", "sectors": "0", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "1", "support_discard": "0", "model": "Virtual Floppy", "partitions": {}, "holders": [], "size": "0.00 Bytes"}, "sdd": {"scheduler_mode": "noop", "rotational": "0", "vendor": "ATA", "sectors": "1562824368", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "512", "model": "THNSF8800CCSE", "partitions": {"sdd1": {"sectorsize": 512, "uuid": null, "sectors": "1562804224", "start": "2048", "holders": [], "size": "745.20 GB"}, "sdd9": {"sectorsize": 512, "uuid": null, "sectors": "16384", "start": "1562806272", "holders": [], "size": "8.00 MB"}}, "holders": [], "size": "745.21 GB"}, "sde": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "DELL", "sectors": "7811891200", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": "PERC H730 Mini", "partitions": {"sde2": {"sectorsize": 512, "uuid": null, "sectors": "999424", "start": "4096", "holders": [], "size": "488.00 MB"}, "sde3": {"sectorsize": 512, "uuid": null, "sectors": "7810885632", "start": "1003520", "holders": ["vg0-root", "vg0-swap", "vg0-data", "vg0-backup", "vg0-shared"], "size": "3.64 TB"}, "sde1": {"sectorsize": 512, "uuid": null, "sectors": "2048", "start": "2048", "holders": [], "size": "1.00 MB"}}, "holders": [], "size": "3.64 TB"}, "sr0": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "iDRAC", "sectors": "1697792", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "2048", "removable": "1", "support_discard": "0", "model": "Virtual CD", "partitions": {}, "holders": [], "size": "3.24 GB"}, "sr1": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "HL-DT-ST", "sectors": "2097151", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "1", "support_discard": "0", "model": "DVD-ROM DU90N", "partitions": {}, "holders": [], "size": "1024.00 MB"}, "sda": {"scheduler_mode": "noop", "rotational": "0", "vendor": "ATA", "sectors": "1562824368", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "512", "model": "THNSF8800CCSE", "partitions": {"sda1": {"sectorsize": 512, "uuid": null, "sectors": "1562804224", "start": "2048", "holders": [], "size": "745.20 GB"}, "sda9": {"sectorsize": 512, "uuid": null, "sectors": "16384", "start": "1562806272", "holders": [], "size": "8.00 MB"}}, "holders": [], "size": "745.21 GB"}, "sdb": {"scheduler_mode": "noop", "rotational": "0", "vendor": "ATA", "sectors": "1562824368", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "512", "model": "THNSF8800CCSE", "partitions": {"sdb1": {"sectorsize": 512, "uuid": null, "sectors": "1562804224", "start": "2048", "holders": [], "size": "745.20 GB"}, "sdb9": {"sectorsize": 512, "uuid": null, "sectors": "16384", "start": "1562806272", "holders": [], "size": "8.00 MB"}}, "holders": [], "size": "745.21 GB"}, "sdc": {"scheduler_mode": "noop", "rotational": "0", "vendor": "ATA", "sectors": "1562824368", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "512", "model": "THNSF8800CCSE", "partitions": {"sdc1": {"sectorsize": 512, "uuid": null, "sectors": "1562804224", "start": "2048", "holders": [], "size": "745.20 GB"}, "sdc9": {"sectorsize": 512, "uuid": null, "sectors": "16384", "start": "1562806272", "holders": [], "size": "8.00 MB"}}, "holders": [], "size": "745.21 GB"}}, "ansible_user_uid": 1001, "ansible_memory_mb": {"real": {"total": 257848, "used": 82, "free": 257766}, "swap": {"cached": 0, "total": 30515, "free": 30515, "used": 0}, "nocache": {"used": 45, "free": 257803}}, "ansible_distribution": "CentOS", "ansible_env": {"SSH_CLIENT": "10.96.64.195 48246 22", "LOGNAME": "centos", "USER": "centos", "PATH": "/usr/local/bin:/usr/bin", "HOME": "/home/centos", "LANG": "en_GB.UTF-8", "TERM": "xterm", "SHELL": "/bin/bash", "SHLVL": "2", "XDG_RUNTIME_DIR": "/run/user/1001", "XDG_SESSION_ID": "c20", "_": "/usr/bin/python", "SSH_CONNECTION": "10.96.64.195 48246 10.96.70.188 22", "SSH_TTY": "/dev/pts/0", "PWD": "/home/centos", "MAIL": "/var/mail/centos", "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:"}, "ansible_distribution_major_version": "7", "module_setup": true, "ansible_processor_count": 2, "ansible_hostname": "c1", "ansible_effective_group_id": 1001, "ansible_swaptotal_mb": 30515, "ansible_real_group_id": 1001, "ansible_bios_date": "11/08/2016", "ansible_all_ipv6_addresses": ["fe80::216:3eff:fe3a:8d51"], "ansible_interfaces": ["lo", "brprim"], "ansible_uptime_seconds": 2158, "ansible_machine_id": "12a0b09bb88e4bee926019ae5d091a6e", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDL4Zny/jNTndTgZ98RxVPjSc/Bk0HfKskhInRiI1bgAPxJuyfJ4fHdld88Rih52kr0gnHytItPSjq8H9g+EI4QpW1NP0Gw9gOmueQkibpEBo76KC5hpGkMkmrGspHD2WxwSk7HPpaMa3DmWcLs0yVSiHzotC/vrwlcIpXWAUt3E+Hvod81oDLZ8omBiy6xoIom0wyFOfoTNnBYHg/gfK9ikNo/T7IMcMThYWJxW9lx+JdpPVqIKnARUg5YHox677d05u52lXtrRkCHnLzZ/r6+m2r1HJF8DNuw0WZhFoi+02JJiPrTDsi9fyAu4MdbFdJqeeaVcBpDZ2yElPtPyh2T", "ansible_gather_subset": ["hardware", "network", "virtual"], "ansible_user_gecos": "", "ansible_system_capabilities_enforced": "True", "ansible_python": {"executable": "/usr/bin/python", "version": {"micro": 5, "major": 2, "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython", "has_sslcontext": true, "version_info": [2, 7, 5, "final", 0]}, "ansible_machine": "x86_64", "ansible_processor_threads_per_core": 1, "ansible_fqdn": "c1", "ansible_user_gid": 1001, "ansible_kernel": "4.4.0-62-generic", "ansible_nodename": "c1", "ansible_system": "Linux", "ansible_user_shell": "/bin/bash", "ansible_system_capabilities": [""], "ansible_all_ipv4_addresses": ["10.96.70.188"], "ansible_python_version": "2.7.5", "ansible_brprim": {"macaddress": "00:16:3e:3a:8d:51", "features": {}, "type": "ether", "mtu": 1500, "device": "brprim", "promisc": false, "ipv4": {"broadcast": "10.96.71.255", "netmask": "255.255.248.0", "network": "10.96.64.0", "address": "10.96.70.188"}, "ipv6": [{"scope": "link", "prefix": "64", "address": "fe80::216:3eff:fe3a:8d51"}], "active": true, "speed": 10000}}}\r\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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 10.96.70.188 closed.\r\n')
ok: [10.96.70.188]
META: ran handlers

TASK [stuff] *************************************************************************************************************************************************************************************
task path: /mmfs1/home/justin/tmp/foo.yml:3
Using module file /home/justin/anaconda2/lib/python2.7/site-packages/ansible/modules/system/ping.py
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.96.70.188> (0, '/home/centos\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301 `" && echo ansible-tmp-1501529026.01-141028396854301="` echo /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301 `" ) && sleep 0'"'"''
<10.96.70.188> (0, 'ansible-tmp-1501529026.01-141028396854301=/home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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')
<10.96.70.188> PUT /tmp/tmpMHJSrI TO /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ping.py
<10.96.70.188> SSH: EXEC sshpass -d13 sftp -o BatchMode=no -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 '[10.96.70.188]'
<10.96.70.188> (0, 'sftp> put /tmp/tmpMHJSrI /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ping.py\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 6 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/centos size 0\r\ndebug3: Looking up /tmp/tmpMHJSrI\r\ndebug3: Sent message fd 6 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/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ping.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:23160\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 23160 bytes at 32768\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')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 10.96.70.188 '/bin/sh -c '"'"'chmod u+x /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ping.py && sleep 0'"'"''
<10.96.70.188> (0, '', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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')
<10.96.70.188> ESTABLISH SSH CONNECTION FOR USER: centos
<10.96.70.188> SSH: EXEC sshpass -d13 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o User=centos -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/justin/.ansible/cp/0c82300404 -tt 10.96.70.188 '/bin/sh -c '"'"'/usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/ping.py; rm -rf "/home/centos/.ansible/tmp/ansible-tmp-1501529026.01-141028396854301/" > /dev/null 2>&1 && sleep 0'"'"''
<10.96.70.188> (0, '\r\n{"invocation": {"module_args": {"data": null}}, "changed": false, "ping": "pong"}\r\n', 'OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/theuser/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 150623\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 10.96.70.188 closed.\r\n')
ok: [10.96.70.188] => {
    "changed": false,
    "invocation": {
        "module_args": {
            "data": null
        }
    },
    "ping": "pong"
}
sending stop: ['sshpass', '-d9', 'ssh', '-vvv', '-C', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'User=centos', '-o', 'ConnectTimeout=10', '-o', 'ControlPath=/mmfs1/home/justin/.ansible/cp/1f0bbf4574', '-O', 'stop', 'None']
META: reset connection
META: ran handlers
META: ran handlers

PLAY RECAP ***************************************************************************************************************************************************************************************
10.96.70.188               : ok=2    changed=0    unreachable=0    failed=0

```



Discussion:
cc @bcoca (I think you did reset_connection?)
@jlec can you confirm PR above fixes the issue for you?
@bcoca no yet another error
```
<10.96.64.17> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=scp -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/kbpd943/.ansible/cp/828a81b6fd 10.96.64.17 '/bin/sh -c '"'"'chmod u+x /var/lib/home/scp/.ansible/tmp/ansible-tmp
-1502527199.16-191625553465624/ /var/lib/home/scp/.ansible/tmp/ansible-tmp-1502527199.16-191625553465624/ping.py && sleep 0'"'"''
<10.96.64.17> (0, '', '')
<10.96.64.17> ESTABLISH SSH CONNECTION FOR USER: scp
<10.96.64.17> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=scp -o ConnectTimeout=10 -o ControlPath=/mmfs1/home/kbpd943/.ansible/cp/828a81b6fd -tt 10.96.64.17 '/bin/sh -c '"'"'/usr/bin/python /var/lib/home/scp/.ansible/tmp/a
nsible-tmp-1502527199.16-191625553465624/ping.py; rm -rf "/var/lib/home/scp/.ansible/tmp/ansible-tmp-1502527199.16-191625553465624/" > /dev/null 2>&1 && sleep 0'"'"''
<10.96.64.17> (0, '\r\n{"invocation": {"module_args": {"data": "pong"}}, "ping": "pong"}\r\n', 'Shared connection to 10.96.64.17 closed.\r\n')
ok: [10.96.64.17] => {
    "changed": false,
    "failed": false,
    "invocation": {
        "module_args": {
            "data": "pong"
        }
    },
    "ping": "pong"
}
sending stop: ['ssh', '-C', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=scp', '-o', 'ConnectTimeout=10', '-o', 'ControlPath=/mmfs1/home/kbpd943/.ansible/cp/cdaaab8d1f', '-O', 'stop', 'None']
ERROR! Cannot reset connection:
Control socket connect(/mmfs1/home/kbpd943/.ansible/cp/cdaaab8d1f): No such file or directory

kbpd943@seskscpg001 ~/tmp (master *)$ ansible --version
ansible 2.4.0
  config file = /home/kbpd943/.ansible.cfg
  configured module search path = [u'/home/kbpd943/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/kbpd943/anaconda2/envs/ansible2/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /home/kbpd943/anaconda2/envs/ansible2/bin/ansible
  python version = 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
```
It looks like when the connection plugin is instantiated the `play_context` has `None` for `remote_addr` so the host specified is `None` which causes the ControlPath to be incorrect.

Not sure if we can use `targeted_host` here or whether it needs addressed elsewhere.
FWIW, #27734 doesn't work for me at all - unless I'm missing something, `self._play_context` doesn't exist and should be `play_context`, but that just results in further errors anyway:

```
TASK [common-auth : set_fact] ****************************************************************************************
task path: /home/lordaro/ansible/roles/common-auth/tasks/main.yml:88
sending stop: ['ssh', '-vvv', '-C', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'StrictHostKeyChecking=no', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '-o', 'ControlPath=/home/cpigott/.ansible/cp/276d6f8b70', '-O', 'stop', 'None']
ERROR! Cannot reset connection:
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: auto-mux: Trying existing master
Control socket connect(/home/lordaro/.ansible/cp/276d6f8b70): No such file or directory
```
Same issue with ansible 2.4.1 but not 2.3.1.
Same issue with ansible 2.4.0.0.
My workaround:
```
- name: reset ssh connection
  local_action:
    module: file
    path: "~/.ansible/cp/{{ hostvars[inventory_hostname]['ansible_host'] }}-{{ hostvars[inventory_hostname]['ansible_port'] }}-{{ hostvars[inventory_hostname]['ansible_user'] }}"
    state: absent
```
Same Issue here with 2.4.1 (2.3.2.0 works fine):

```
ansible 2.4.1.0
  config file = /Users/roock/git/pci-ansible/ansible.cfg
  configured module search path = [u'/Users/roock/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.4.1.0/libexec/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.14 (default, Sep 25 2017, 09:53:17) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
```

```
TASK [consul : Reboot Host] **************************************************************************************************************************************************************************************************************************************************
changed: [XXXXXXXXXXXXXXXXXXX]
ERROR! Cannot reset connection:
Control socket connect(/Users/roock/.ansible/cp/276d6f8b70): No such file or directory
```


Also it appears that `meta: reset_connection` is picking a control_path but it is definitely not respecting the remote_host control_path.


ansible.cfg:
```ssh_connection] 
control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
```

using a simple playbook

```yaml
- hosts: cm-lin
  tasks:
    - ping:
    - meta: reset_connection
      ignore_errors: True
    - ping:
```



indeed the control files are there:

```bash
~/.ansible/cp $ ls -la
total 0
drwx------  7 user  staff  224 Dec 13 11:51 .
drwx------  4 user  staff  128 Dec 13 10:04 ..
srw-------  1 user  staff    0 Dec 13 11:51 ansible-ssh-cm-lin-01.company.com-22-company
srw-------  1 user  staff    0 Dec 13 11:51 ansible-ssh-cm-lin-02.company.com-22-company
srw-------  1 user  staff    0 Dec 13 11:51 ansible-ssh-cm-lin-03.company.com-22-company
srw-------  1 user  staff    0 Dec 13 11:51 ansible-ssh-cm-lin-04.company.com-22-company
```

**however**  meta_reset connection is looking for:

```bash
ERROR! Cannot reset connection:
OpenSSH_7.5p1, LibreSSL 2.5.4
debug1: Reading configuration data /Users/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 52: Applying options for *
debug1: auto-mux: Trying existing master
Control socket connect(/Users/user/.ansible/cp/ansible-ssh-none-22-mobi): No such file or directory
```


##### ANSIBLE VERSION
```
$ ansible --version
ansible 2.4.2.0
  config file = /Users/user/dir/gitlab/devops/ansible/ansible.cfg
  configured module search path = [u'/Users/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Library/Python/2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
```

##### Configuration
```
ANSIBLE_NOCOWS(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = False
ANSIBLE_SSH_CONTROL_PATH(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = %(directory)s/ansible-ssh-%%h-%%p-%%r
DEFAULT_HOST_LIST(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = [u'/Users/user/dir/gitlab/devops/ansible/inventory']
DEFAULT_PRIVATE_KEY_FILE(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = /Users/user/dir/gitlab/devops/ansible/inventory/.rsa/iqa_id_rsa
DEFAULT_REMOTE_USER(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = dir
DEFAULT_ROLES_PATH(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = [u'/Users/user/dir/gitlab/devops/ansible/roles']
HOST_KEY_CHECKING(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = False
RETRY_FILES_SAVE_PATH(/Users/user/dir/gitlab/devops/ansible/ansible.cfg) = /Users/user/.ansible-retry
```

##### OS / ENVIRONMENT

```
$ uname -a
Darwin MacBook-Pro.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

```
Same problem on Ansible 2.4.2.0, any updates ?
Same for me on 2.4.2.0
```
ERROR! Cannot reset connection:
Control socket connect(/home/zohar/.ansible/cp/cd55c88c7b): No such file or directory
```
Same error in ansible 2.4.3.0
```
ERROR: Cannot reset connection:
Control socket connect(/home/ubuntu/.ansible/cp/276d6f8b70): No such file or directory
```

@fpoulain The workaround didn't work for me unfortunately:

> The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_host'

I'm using Vagrant + Ansible and I haven't found a viable workaround for this, so currently I have to run the playbook twice and let it crash the first time.
Same error in ansible 2.5.0.
Also as a workaround, this is what I do:
```
- pause:
    seconds: 90

```
Since the connection times out after 60 seconds, this circumvents the problem.
Since this affects 2.4 and 2.5, can we get a this tagged with labels acknowledging it?
Workaround using local SSH invocation (Ansible 2.5+):
```
- name: Reset persistent connection to host
  local_action:
    module: "command ssh -o ControlPath={{ control_path }}
                         -O stop {{port_arg}} {{user_arg}} {{ host }}"
  vars:
    host: "{{ hostvars[inventory_hostname]['ansible_host'] |
              default(inventory_hostname) }}"
    port: "{{ hostvars[inventory_hostname]['ansible_port'] |
              default('None') }}"
    user: "{{ hostvars[inventory_hostname]['ansible_user'] |
              default('None') }}"
    port_arg: "{{ '-o Port=' ~ port if port != 'None' else '' }}"
    user_arg: "{{ '-o User=' ~ user if user != 'None' else '' }}"
    connection_string_hash: "{{ [host, port, user] | join('-') |
                                hash('sha1') | truncate (10, False, '', 0) }}"
    control_path_dir: "{{ lookup('config', 'ANSIBLE_SSH_CONTROL_PATH_DIR') |
                          default('~/.ansible/cp', True)}}"
    control_path: "{{ lookup('config', 'ANSIBLE_SSH_CONTROL_PATH') |
                      default('', True) |
                      replace('%(directory)s', control_path_dir) |
                      replace('%%', '%') |
                      default(control_path_dir ~ '/' ~ connection_string_hash, True) }}"
```

Gist: https://gist.github.com/forkbomber/f0177f6371b00cc0776a8892f19487c2
I've confirmed that this bug is not present in the latest stable-2.3 git, but is present in the latest 2.4, 2.5, and 2.6 git.

test.yml:
```
---
- hosts: g104boom01
  gather_facts: no
  tasks:
  - ping:
  - meta: reset_connection
```

stable-2.3:
```
$ ansible-playbook test.yml -vvv
Using /home/user/.ansible.cfg as config file

PLAYBOOK: test.yml ************************************************************************************************************************************************************************************************************************
1 plays in test.yml

PLAY [g104boom01] *************************************************************************************************************************************************************************************************************************
META: ran handlers
Using module file /home/user/ansible-ansible/lib/ansible/modules/system/ping.py
<g104boom01> ESTABLISH SSH CONNECTION FOR USER: grp104dom
<g104boom01> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=grp104dom -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/c4619a4755 g104boom01 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<g104boom01> (0, '\n{"invocation": {"module_args": {"data": null}}, "changed": false, "ping": "pong"}\n', '')
sending stop: ['ssh', '-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/user/.ansible/cp/276d6f8b70', '-O', 'stop', 'None']
META: reset connection
META: ran handlers
META: ran handlers

PLAY RECAP ********************************************************************************************************************************************************************************************************************************
g104boom01                 : ok=1    changed=0    unreachable=0    failed=0
```

stable-2.6:
```
]$ ansible-playbook test.yml -vvv
ansible-playbook 2.6.0dev0 (stable-2.6 882f249f1d) last updated 2018/05/26 21:43:42 (GMT -400)
  config file = /home/user/.ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/ansible-ansible/lib/ansible
  executable location = /home/user/ansible-ansible/bin/ansible-playbook
  python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Using /home/user/.ansible.cfg as config file
Parsed /home/user/ansible/inventory inventory source with ini plugin

PLAYBOOK: test.yml ************************************************************************************************************************************************************************************************************************
1 plays in test.yml

PLAY [g104boom01] *************************************************************************************************************************************************************************************************************************
META: ran handlers
Using module file /home/user/ansible-ansible/lib/ansible/modules/system/ping.py
<g104boom01> ESTABLISH SSH CONNECTION FOR USER: grp104dom
<g104boom01> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=grp104dom -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/user/.ansible/cp/c4619a4755 g104boom01 '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<g104boom01> (0, '\n{"invocation": {"module_args": {"data": "pong"}}, "ping": "pong"}\n', 'You are accessing a U.S. Government (USG) Information System (IS) that is\nprovided for USG-authorized use only.\n\nBy using this IS (which includes any device attached to this IS), you consent\nto the following conditions:\n\n-The USG routinely intercepts and monitors communications on this IS for\npurposes including, but not limited to, penetration testing, COMSEC monitoring,\nnetwork operations and defense, personnel misconduct (PM), law enforcement\n(LE), and counterintelligence (CI) investigations.\n\n-At any time, the USG may inspect and seize data stored on this IS.\n\n-Communications using, or data stored on, this IS are not private, are subject\nto routine monitoring, interception, and search, and may be disclosed or used\nfor any USG-authorized purpose.\n\n-This IS includes security measures (e.g., authentication and access controls)\nto protect USG interests--not for your personal benefit or privacy.\n\n-Notwithstanding the above, using this IS does not constitute consent to PM, LE\nor CI investigative searching or monitoring of the content of privileged\ncommunications, or work product, related to personal representation or services\nby attorneys, psychotherapists, or clergy, and their assistants. Such\ncommunications and work product are private and confidential. See User\nAgreement for details.\n')
sending stop: ['ssh', '-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/user/.ansible/cp/276d6f8b70', '-O', 'stop', 'None']
ERROR! Cannot reset connection:
Control socket connect(/home/user/.ansible/cp/276d6f8b70): No such file or directory
```
I git-bisect'ed it to c3ffc49914285774729193d1a09d9a6976369deb, which was introduced by https://github.com/ansible/ansible/pull/25211 

Closer inspection indicates that the connection was never actually being reset, that commit only introduced the code to notice the failure.

Resolving patch:
diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py
--- a/lib/ansible/plugins/strategy/__init__.py
+++ b/lib/ansible/plugins/strategy/__init__.py
@@ -993,8 +993,30 @@ def _evaluate_conditional(h):
                         iterator._host_states[host.name].run_state = iterator.ITERATING_COMPLETE
                 msg = "ending play"
         elif meta_action == 'reset_connection':
+            all_vars = self._variable_manager.get_vars(play=iterator._play, host=target_host, task=task)
+            templar = Templar(loader=self._loader, variables=all_vars)
+
+            # apply the given task's information to the connection info,
+            # which may override some fields already set by the play or
+            # the options specified on the command line
+            play_context = play_context.set_task_and_variable_override(task=task, variables=all_vars, templar=templar)
+
+            # fields set from the play/task may be based on variables, so we have to
+            # do the same kind of post validation step on it here before we use it.
+            play_context.post_validate(templar=templar)
+
+            # now that the play context is finalized, if the remote_addr is not set
+            # default to using the host's address field as the remote address
+            if not play_context.remote_addr:
+                play_context.remote_addr = target_host.address
+
+            # We also add "magic" variables back into the variables dict to make sure
+            # a certain subset of variables exist.
+            play_context.update_vars(all_vars)
+
             if task.when:
                 self._cond_not_supported_warn(meta_action)
+
             if target_host in self._active_connections:
                 connection = Connection(self._active_connections[target_host])
                 del self._active_connections[target_host]


Test patch: