Weird deployment issue - "subsystem request failed on channel 0 - Connection reset by peer"

Hey guys,

We are experiencing an issue with one of our servers. This happens during the gather facts task. I am not a systems guy so i’m not sure what is going on here.

GATHERING FACTS ***************************************************************
ESTABLISH CONNECTION FOR USER: deploy_rn
REMOTE_MODULE setup CHECKMODE=True
EXEC ssh -C -tt -vvv -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy_rn -o ConnectTimeout=10 LDSB-COH04 /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1448191353.32-199010706409322 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1448191353.32-199010706409322 && echo $HOME/.ansible/tmp/ansible-tmp-1448191353.32-199010706409322’
PUT /tmp/tmpV2JSGP TO /home/jajah.dublin/deploy_rn/.ansible/tmp/ansible-tmp-1448191353.32-199010706409322/setup
fatal: [LDSB-COH04] => failed to transfer file to /home/jajah.dublin/deploy_rn/.ansible/tmp/ansible-tmp-1448191353.32-199010706409322/setup:

Connecting to LDSB-COH04…

Fixed by adding this in ansible.cfg:

[ssh_connection]
scp_if_ssh=True