Skip to content

Instantly share code, notes, and snippets.

@eparis
Created July 13, 2015 15:29
Show Gist options
  • Save eparis/461dfef9cfac11ab19e5 to your computer and use it in GitHub Desktop.
Save eparis/461dfef9cfac11ab19e5 to your computer and use it in GitHub Desktop.
Catched Error: Catched Error: SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.
commit b42ed4183439c4c24639cff7398023e3355f9f42
Author: Eric Paris <[email protected]>
Date:   Mon Jul 13 10:21:04 2015 -0400

    Add vbox support

diff --git a/contrib/ansible/vagrant/Vagrantfile b/contrib/ansible/vagrant/Vagrantfile
index 268cd14..142e63f 100644
--- a/contrib/ansible/vagrant/Vagrantfile
+++ b/contrib/ansible/vagrant/Vagrantfile
@@ -61,6 +61,15 @@ END
     #os.floating_ip = "auto"
   end
 
+  def set_vbox(vb, config)
+    config.vm.box = "chef/centos-7.0"
+    config.ssh.username = "vagrant"
+    config.ssh.password = "vagrant"
+    config.vm.network "private_network", type: "dhcp"
+    vb.gui = false
+    vb.memory = "2048"
+  end
+
   config.vm.synced_folder ".", "/vagrant", disabled: true
 
   nodes = Array.new()
@@ -75,6 +84,9 @@ END
       n.vm.provider :openstack do |os|
         set_openstack(os, config, name)
       end
+      n.vm.provider :virtualbox do |vb|
+        set_vbox(vb, config)
+      end
     end
   end
 
@@ -96,6 +108,9 @@ END
     n.vm.provider :openstack do |os|
       set_openstack(os, config, name)
     end
+    n.vm.provider :virtualbox do |vb|
+      set_vbox(vb, config)
+    end
 
     # This set up the vagrant hosts before we run the main playbook
     # Today this just creates /etc/hosts so machines can talk via their
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment