Ansible SSH issues under CentOS

I needed a CentOS 6.5 guest under a CentOS 6.6 host for development and to prepare for deployments.

I could not get Ansible to SSH into the box.

I took the provisioning out of the Vagrantfile and began running the playbook on the command line with:

ansible-playbook main.yml -i inventories/vagrant -u vagrant -vvvv -k

Issues:

  • Offending key in /home/user - removed offending key
  • sshpass not installed - installed sshpass
  • SSHed in directly using the user (vagrant) that will be provisioning
  • Set the .gui flag to true in the Vagrantfile - http://docs.vagrantup.com/v2/virtualbox/configuration.html. This made it easier to see what was happening.