Move Windows symlink re-establishment after reboot into capability
This reduces the complexity and likelihood of provisioner bugs.
This commit is contained in:
parent
9c420b8738
commit
068b5cf0b9
|
@ -12,6 +12,10 @@ module VagrantPlugins
|
|||
while machine.communicate.execute(script, error_check: false) != 0
|
||||
sleep 10
|
||||
end
|
||||
|
||||
# This re-establishes our symbolic links if they were
|
||||
# created between now and a reboot
|
||||
machine.communicate.execute("net use", error_check: false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -62,14 +62,6 @@ module VagrantPlugins
|
|||
@machine.guest.capability(:wait_for_reboot)
|
||||
end
|
||||
|
||||
if windows?
|
||||
# This re-establishes our symbolic links if they were
|
||||
# created between now and a reboot
|
||||
@machine.communicate.execute(
|
||||
"& net use a-non-existant-share",
|
||||
error_check: false)
|
||||
end
|
||||
|
||||
command = build_command(:client)
|
||||
|
||||
@config.attempts.times do |attempt|
|
||||
|
|
|
@ -138,14 +138,6 @@ module VagrantPlugins
|
|||
@machine.guest.capability(:wait_for_reboot)
|
||||
end
|
||||
|
||||
if windows?
|
||||
# This re-establishes our symbolic links if they were
|
||||
# created between now and a reboot
|
||||
@machine.communicate.execute(
|
||||
"& net use a-non-existant-share",
|
||||
error_check: false)
|
||||
end
|
||||
|
||||
command = build_command(:solo)
|
||||
|
||||
@config.attempts.times do |attempt|
|
||||
|
|
|
@ -101,14 +101,6 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def run_puppet_apply
|
||||
if windows?
|
||||
# This re-establishes our symbolic links if they were
|
||||
# created between now and a reboot
|
||||
@machine.communicate.execute(
|
||||
"& net use a-non-existant-share",
|
||||
error_check: false)
|
||||
end
|
||||
|
||||
default_module_path = "/etc/puppet/modules"
|
||||
if windows?
|
||||
default_module_path = "/ProgramData/PuppetLabs/puppet/etc/modules"
|
||||
|
|
Loading…
Reference in New Issue