core: don't replace insecure key on base package [GH-5310]

This commit is contained in:
Mitchell Hashimoto 2015-11-18 16:24:53 -08:00
parent 42d0c3637c
commit 1a7937ed50
2 changed files with 12 additions and 0 deletions

View File

@ -116,6 +116,9 @@ module Vagrant
# XXX: This is temporary. This will be removed very soon. # XXX: This is temporary. This will be removed very soon.
if base if base
@id = name @id = name
# For base setups, we don't want to insert the key
@config.ssh.insert_key = false
else else
reload reload
end end

View File

@ -70,6 +70,15 @@ describe Vagrant::Machine do
expect(subject.id).to be_nil expect(subject.id).to be_nil
end 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 describe "communicator loading" do
it "doesn't eager load SSH" do it "doesn't eager load SSH" do
config.vm.communicator = :ssh config.vm.communicator = :ssh