provisioners/chef: reinit net shares on Windows guests
This commit is contained in:
parent
427d49402d
commit
909cda4bd1
|
@ -138,6 +138,10 @@ module VagrantPlugins
|
|||
File.join(@config.provisioning_path, "encrypted_data_bag_secret_key")
|
||||
end
|
||||
end
|
||||
|
||||
def windows?
|
||||
@machine.config.vm.communicator == :winrm
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,6 +58,14 @@ module VagrantPlugins
|
|||
@machine.ui.warn(I18n.t("vagrant.chef_run_list_empty"))
|
||||
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_env = @config.binary_env ? "#{@config.binary_env} " : ""
|
||||
command_args = @config.arguments ? " #{@config.arguments}" : ""
|
||||
command = "#{command_env}#{chef_binary_path("chef-client")} " +
|
||||
|
|
|
@ -134,6 +134,14 @@ module VagrantPlugins
|
|||
@machine.ui.warn(I18n.t("vagrant.chef_run_list_empty"))
|
||||
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
|
||||
|
||||
options = [
|
||||
"-c #{@config.provisioning_path}/solo.rb",
|
||||
"-j #{@config.provisioning_path}/dna.json"
|
||||
|
|
Loading…
Reference in New Issue