guests/windows: rdp_info cap
This commit is contained in:
parent
0fa07637f9
commit
993256643d
|
@ -0,0 +1,20 @@
|
||||||
|
module VagrantPlugins
|
||||||
|
module GuestWindows
|
||||||
|
module Cap
|
||||||
|
class RDP
|
||||||
|
def self.rdp_info(machine)
|
||||||
|
ssh_info = machine.ssh_info
|
||||||
|
username = ssh_info[:username]
|
||||||
|
if machine.config.vm.communicator == :winrm
|
||||||
|
username = machine.config.winrm.username
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
host: ssh_info[:host],
|
||||||
|
username: username,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -49,6 +49,11 @@ module VagrantPlugins
|
||||||
Cap::MountSharedFolder
|
Cap::MountSharedFolder
|
||||||
end
|
end
|
||||||
|
|
||||||
|
guest_capability(:windows, :rdp_info) do
|
||||||
|
require_relative "cap/rdp"
|
||||||
|
Cap::RDP
|
||||||
|
end
|
||||||
|
|
||||||
guest_capability(:windows, :wait_for_reboot) do
|
guest_capability(:windows, :wait_for_reboot) do
|
||||||
require_relative "cap/reboot"
|
require_relative "cap/reboot"
|
||||||
Cap::Reboot
|
Cap::Reboot
|
||||||
|
|
Loading…
Reference in New Issue