- name: Make the aws credentials directory
file:
state: directory
path: ~/.aws
- name: Make the hi directory
file:
state: directory
path: ~/.hi
- name: Make a temp directory
file:
state: directory
path: ~/.temp
- name: Make a bar directory
file:
state: directory
path: ~/.bar
And this fails at the Make a temp directory task. The failed output with -vvv looks like:
<35.160.185.188> (0, '', "Warning: Permanently added '35.160.185.188' (ECDSA) to the list of known hosts.\r\n")
<35.160.185.188> ESTABLISH SSH CONNECTION FOR USER: ubuntu
<35.160.185.188> SSH: EXEC ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i AnsibleTest.pem -o 'IdentityFile="[omitted_full_path]/AnsibleTest.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -tt 35.160.185.188 '/bin/sh -c '"'"'/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1510596698.75-58373657425242/file.py; rm -rf "/home/ubuntu/.ansible/tmp/ansible-tmp-1510596698.75-58373657425242/" > /dev/null 2>&1 && sleep 0'"'"''
<35.160.185.188> (255, '', 'ssh_exchange_identification: read: Connection reset by peer\r\n')
fatal: [35.160.185.188]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh_exchange_identification: read: Connection reset by peer\r\n",
"unreachable": true
}
I am using the following ssh_args in my ansible.cfg for the playbook:
ssh_args = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "AnsibleTest.pem"
Does anyone know what's happening here? This seems pretty weird and I'm stuck.
Thanks!