Fix incorrect ssh-config output when '--host' is defined
Fixes: #7728 Signed-off-by: guessi <guessi@gmail.com>
This commit is contained in:
parent
8dd44a02da
commit
c77326438b
|
@ -32,6 +32,10 @@ module VagrantPlugins
|
||||||
ssh_info = machine.ssh_info
|
ssh_info = machine.ssh_info
|
||||||
raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
|
raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
|
||||||
|
|
||||||
|
if options[:host] && options[:host].to_s != machine.name.to_s
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
variables = {
|
variables = {
|
||||||
host_key: options[:host] || machine.name || "vagrant",
|
host_key: options[:host] || machine.name || "vagrant",
|
||||||
ssh_host: ssh_info[:host],
|
ssh_host: ssh_info[:host],
|
||||||
|
|
Loading…
Reference in New Issue