kernel/v2: always forward SSH [GH-4437]
This commit is contained in:
parent
b8aaac893d
commit
8655d212c3
|
@ -2,6 +2,7 @@
|
|||
|
||||
BUG FIXES:
|
||||
|
||||
- core: forward SSH even if WinRM is used. [GH-4437]
|
||||
- communicator/ssh: Fix crash when pty is enabled with SSH. [GH-4452]
|
||||
- guests/redhat: Detect various RedHat flavors. [GH-4462]
|
||||
- guests/redhat: Fix typo causing crash in configuring networks. [GH-4438]
|
||||
|
|
|
@ -374,7 +374,9 @@ module VagrantPlugins
|
|||
id: "winrm",
|
||||
auto_correct: true
|
||||
end
|
||||
elsif !@__networks["forwarded_port-ssh"]
|
||||
end
|
||||
|
||||
if !@__networks["forwarded_port-ssh"]
|
||||
network :forwarded_port,
|
||||
guest: 22,
|
||||
host: 2222,
|
||||
|
|
|
@ -182,12 +182,17 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
|||
subject.communicator = "winrm"
|
||||
subject.finalize!
|
||||
n = subject.networks
|
||||
expect(n.length).to eq(1)
|
||||
expect(n.length).to eq(2)
|
||||
expect(n[0][0]).to eq(:forwarded_port)
|
||||
expect(n[0][1][:guest]).to eq(5985)
|
||||
expect(n[0][1][:host]).to eq(55985)
|
||||
expect(n[0][1][:host_ip]).to eq("127.0.0.1")
|
||||
expect(n[0][1][:id]).to eq("winrm")
|
||||
|
||||
expect(n[1][0]).to eq(:forwarded_port)
|
||||
expect(n[1][1][:guest]).to eq(22)
|
||||
expect(n[1][1][:host]).to eq(2222)
|
||||
expect(n[1][1][:id]).to eq("ssh")
|
||||
end
|
||||
|
||||
it "allows overriding SSH" do
|
||||
|
@ -210,7 +215,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
|||
subject.finalize!
|
||||
|
||||
n = subject.networks
|
||||
expect(n.length).to eq(1)
|
||||
expect(n.length).to eq(2)
|
||||
expect(n[0][0]).to eq(:forwarded_port)
|
||||
expect(n[0][1][:guest]).to eq(22)
|
||||
expect(n[0][1][:host]).to eq(14100)
|
||||
|
|
Loading…
Reference in New Issue