metamon icon indicating copy to clipboard operation
metamon copied to clipboard

Playbook fails on SSH into Vagrant

Open bensojona opened this issue 9 years ago • 7 comments

Hey there, I'm having an issue attempting to run the ansible playbooks after creating the vagrant box. I end up getting an error when it attempts to SSH into the vagrant box. My debug output is in the below gist.

https://gist.github.com/bensojona/ce4030c088d4894b7603

To setup, I cloned the repo into my projects root folder, did a vagrant up using virtualbox, updated the "project_name" and "secret_key" in the all.yml file, then went into the deploy folder and ran deploy_dev.sh. Any obvious config/setup step I'm missing?

Thanks!

bensojona avatar Apr 01 '15 18:04 bensojona

I think it may be possible that in your ~/.ssh/known_hosts you already have a machine with the same IP and a different key. Try deleting it (backup it first!) and re-run deploy_dev.sh.

maurodec avatar Apr 01 '15 18:04 maurodec

Thought that was the issue at first as well, but didn't seem to have any luck after removing. I removed it again and re-ran, got the same output, below shows it's not a known_host (to confirm it wasn't in there).

https://gist.github.com/bensojona/f596c007d44428576f56#file-metamon_fail_remove_ip_from_known_hosts-L7

bensojona avatar Apr 01 '15 18:04 bensojona

  • What version of Virtualbox, Vagrant and Ansible are you running?
  • Can you vagrant ssh into the machine?
  • Have you tried adding the -vvvv option to deploy_dev.sh? It may give some more information.

maurodec avatar Apr 01 '15 18:04 maurodec

VirtualBox 4.3.26 r98988 Vagrant 1.7.1 Ansible 1.7.1

I can vagrant ssh into the machine just fine. And yep, -vvvv is what gave the output in the above gists.

bensojona avatar Apr 01 '15 19:04 bensojona

It seems like it's probably a problem with Ansible. All I can think of i updating everything and retrying.

maurodec avatar Apr 01 '15 19:04 maurodec

I'll give that a shot, thanks!

bensojona avatar Apr 01 '15 20:04 bensojona

Found that this was happening when vagrant was provisioning --> https://gist.github.com/bensojona/b180b4e7b509141772a3#file-vagrant_up_virtualbox-L31

Adding this line and re-provisioning (as well as removing the entry for that ip in ~/.ssh/known_hosts) seemed to have solved the issue --> https://gist.github.com/bensojona/eb70c6e9d110f4532d38#file-vagrantfile-L11

bensojona avatar Apr 01 '15 21:04 bensojona