I got this error when I run ansible-playbook wireguard.yml -u root -k -i hosts
fatal: [172.31.43.89]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey).", "unreachable": true}
to retry, use: --limit @/home/ubuntu/wireguard_ansible/wireguard.retry
PLAY RECAP *****
172.31.43.89 : ok=0 changed=0 unreachable=1 failed=0
I got this error when I run ansible-playbook wireguard.yml -u root -k -i hosts
fatal: [172.31.43.89]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey).", "unreachable": true} to retry, use: --limit @/home/ubuntu/wireguard_ansible/wireguard.retry
PLAY RECAP ***** 172.31.43.89 : ok=0 changed=0 unreachable=1 failed=0
I setup my hosts as
[all]
172.31.43.89 ansible_python_interpreter=/usr/bin/python
I run this on Amazon EC2 , ubuntu 14