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.
if base
@id = name
# For base setups, we don't want to insert the key
@config.ssh.insert_key = false
else
reload
end

View File

@ -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