Merge pull request #7877 from guessi/fix_7728_incorrect-ssh-config-output

Fix incorrect ssh-config output when '--host' is defined
This commit is contained in:
Chris Roberts 2016-10-07 15:19:18 -07:00 committed by GitHub
commit bb60fdd790
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ module VagrantPlugins
ssh_info = machine.ssh_info
raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
if options[:host] && options[:host].to_s != machine.name.to_s
next
end
variables = {
host_key: options[:host] || machine.name || "vagrant",
ssh_host: ssh_info[:host],