commands/ssh-config: work without target into multi-machine env [GH-2844]

This commit is contained in:
Mitchell Hashimoto 2014-04-09 15:41:43 -07:00
parent 485422640e
commit ac5a0cf326
2 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,10 @@ FEATURES:
so that subsequent `vagrant up` or `reload` calls will always run a
provisioner. [GH-2421]
IMPROVEMENTS:
- commands/ssh-config: Works without a target in multi-machine envs [GH-2844]
## 1.5.4 (April 21, 2014)
IMPROVEMENTS:

View File

@ -18,7 +18,7 @@ module VagrantPlugins
o.banner = "Usage: vagrant ssh-config [options] [name]"
o.separator ""
o.separator "Options:"
o.separator ""
o.separator ""
o.on("--host NAME", "Name the host for the config") do |h|
options[:host] = h
@ -28,7 +28,7 @@ module VagrantPlugins
argv = parse_options(opts)
return if !argv
with_target_vms(argv, :single_target => true) do |machine|
with_target_vms(argv) do |machine|
ssh_info = machine.ssh_info
raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
@ -46,6 +46,7 @@ module VagrantPlugins
# Render the template and output directly to STDOUT
template = "commands/ssh_config/config"
safe_puts(Vagrant::Util::TemplateRenderer.render(template, variables))
safe_puts
end
# Success, exit status 0