lib/vagrant-winrm/commands/winrm_config.rb in vagrant-winrm-0.5.0 vs lib/vagrant-winrm/commands/winrm_config.rb in vagrant-winrm-0.6.0

- old
+ new

@@ -1,7 +1,8 @@ require 'optparse' require 'vagrant/util/safe_puts' +require 'vagrant/../../plugins/communicators/winrm/helper' module VagrantPlugins module VagrantWinRM class WinRMConfig < Vagrant.plugin('2', :command) include Vagrant::Util::SafePuts @@ -28,11 +29,11 @@ with_target_vms(argv) do |machine| variables = { host_key: options[:host] || machine.name || 'vagrant', - winrm_host: machine.config.winrm.host, - winrm_port: machine.config.winrm.port, + winrm_host: VagrantPlugins::CommunicatorWinRM::Helper.winrm_info(machine)[:host], + winrm_port: VagrantPlugins::CommunicatorWinRM::Helper.winrm_info(machine)[:port], winrm_user: machine.config.winrm.username, winrm_password: machine.config.winrm.password } # Render the template and output directly to STDOUT