Connection error deploying to aws

Trellis is failing on “TASK [Install Python 2.x]”. I thought it was a ssh issue so I replaced my current ssh key with the one generated by aws(the ‘.pem’ file) so now I can just ‘ssh’ into it without specifying the key. Here is the exact output.

TASK [Install Python 2.x] ******************************************************
System info:
Ansible 2.1.1.0; Linux
Trellis at “WP 4.6 Compat: set WP_HOME/SITEURL directly”

Failed to connect to the host via ssh.
fatal: [54.218.99.69]: UNREACHABLE! => {“changed”: false, “unreachable”: true}
[WARNING]: Could not create retry file ‘server.retry’. [Errno 2] No
such file or directory: ‘’

PLAY RECAP *********************************************************************
54.218.99.69 : ok=4 changed=0 unreachable=1 failed=0
localhost : ok=0 changed=0 unreachable=0 failed=0

Any help would be much appreciated.

There is so much searchable discussion for Failed to connect to the host via ssh that you may not get much forum response till you report the specific related troubleshooting steps you’ve found and tried.

You’ll find in those threads the recommendation to get more verbose debugging info by adding -vvvv to your command:

ansible-playbook server.yml -e env=production -vvvv

Also take a look at the SSH keys docs, if you haven’t already. For example, this excerpt applies to AWS:

If your hosting provider disables root but provides a default user such as ubuntu, specify admin_user: ubuntu