Merge pull request #4615 from styro/fix/master/issue-4614
provisoiners/salt: Check whether Salt bootstrap script exists before deleting it. GH-4614
This commit is contained in:
commit
34ac5f474c
|
@ -236,7 +236,9 @@ module VagrantPlugins
|
|||
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
|
||||
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.sudo("chmod +x %s" % bootstrap_destination)
|
||||
if @machine.config.vm.communicator == :winrm
|
||||
|
|
Loading…
Reference in New Issue