metamon
metamon copied to clipboard
Playbook fails on SSH into Vagrant
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!
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
.
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
- What version of Virtualbox, Vagrant and Ansible are you running?
- Can you
vagrant ssh
into the machine? - Have you tried adding the
-vvvv
option todeploy_dev.sh
? It may give some more information.
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.
It seems like it's probably a problem with Ansible. All I can think of i updating everything and retrying.
I'll give that a shot, thanks!
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