Solved: Server Provisioning failing at task python_interpreter with ssh error

So I have a server I can ssh into without error, but when provisioning with
ansible-playbook server.yml -e env=production
I get an error when it gets to the python_interpreter task, at the step Get Ubuntu release. It says
Failed to connect to the host via ssh: Permission denied (publickey,password) fatal: [1.2.3.4]: UNREACHABLE! => {"changed": false, "unreachable": true}

The fact it made it to this step before failing seems to indicate that ansible actually can connect to the server fine, but I’m not sure why the server is complaining.

Here’s the output when I provision for production with -vvvv. (I replaced my ip with 1.2.3.4. Running trellis version 1.0.1)
Pastebin of output

Hi!
What is your host operating system? Are you on MacOS or Windows?

If MacOS, try typing ssh-add -K and provisioning again.

1 Like

Hi,

Sorry, I’m on windows, using WSL. I have ssh-agent running. Also for some reason I wrote ansible 1.0.1 when I meant I was using trellis 1.0.1.

UPDATE: it seems my ssh keys weren’t set up properly on the server. Provisioning with --ask-pass did it.

This topic was automatically closed after 42 days. New replies are no longer allowed.