Check whether Salt bootstrap script exists before attempting to delete it. GH-4614
This commit is contained in:
parent
31c77bed37
commit
fdbf3366ce
|
@ -236,7 +236,9 @@ module VagrantPlugins
|
||||||
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
|
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
|
||||||
end
|
end
|
||||||
|
|
||||||
@machine.communicate.sudo("rm -f %s" % bootstrap_destination)
|
if @machine.communicate.test("test -f %s" % bootstrap_destination)
|
||||||
|
@machine.communicate.sudo("rm -f %s" % bootstrap_destination)
|
||||||
|
end
|
||||||
@machine.communicate.upload(bootstrap_path.to_s, bootstrap_destination)
|
@machine.communicate.upload(bootstrap_path.to_s, bootstrap_destination)
|
||||||
@machine.communicate.sudo("chmod +x %s" % bootstrap_destination)
|
@machine.communicate.sudo("chmod +x %s" % bootstrap_destination)
|
||||||
if @machine.config.vm.communicator == :winrm
|
if @machine.config.vm.communicator == :winrm
|
||||||
|
|
Loading…
Reference in New Issue