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:
Mitchell Hashimoto 2014-10-18 16:13:20 -07:00
commit 34ac5f474c
1 changed files with 3 additions and 1 deletions

View File

@ -236,7 +236,9 @@ module VagrantPlugins
bootstrap_destination = File.join(config_dir, "bootstrap_salt.sh")
end
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