diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index 4e66b08bf..c1d0e8d7a 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -116,6 +116,9 @@ module Vagrant # XXX: This is temporary. This will be removed very soon. if base @id = name + + # For base setups, we don't want to insert the key + @config.ssh.insert_key = false else reload end diff --git a/test/unit/vagrant/machine_test.rb b/test/unit/vagrant/machine_test.rb index 4064fa1d5..cb47a3ef8 100644 --- a/test/unit/vagrant/machine_test.rb +++ b/test/unit/vagrant/machine_test.rb @@ -70,6 +70,15 @@ describe Vagrant::Machine do expect(subject.id).to be_nil end + describe "as a base" do + let(:base) { true} + + it "should not insert key" do + subject = new_instance + expect(subject.config.ssh.insert_key).to be_false + end + end + describe "communicator loading" do it "doesn't eager load SSH" do config.vm.communicator = :ssh