Merge pull request #2670 from ampedandwired/chef_force_rm

provisioner/chef-solo: force rm of chef config files #2669
This commit is contained in:
Mitchell Hashimoto 2013-12-17 16:29:23 -08:00
commit 5a70b3abde
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ module VagrantPlugins
remote_file = File.join(config.provisioning_path, filename) remote_file = File.join(config.provisioning_path, filename)
@machine.communicate.tap do |comm| @machine.communicate.tap do |comm|
comm.sudo("rm #{remote_file}", :error_check => false) comm.sudo("rm -f #{remote_file}", :error_check => false)
comm.upload(temp.path, remote_file) comm.upload(temp.path, remote_file)
end end
end end
@ -100,7 +100,7 @@ module VagrantPlugins
remote_file = File.join(@config.provisioning_path, "dna.json") remote_file = File.join(@config.provisioning_path, "dna.json")
@machine.communicate.tap do |comm| @machine.communicate.tap do |comm|
comm.sudo("rm #{remote_file}", :error_check => false) comm.sudo("rm -f #{remote_file}", :error_check => false)
comm.upload(temp.path, remote_file) comm.upload(temp.path, remote_file)
end end
end end

View File

@ -116,7 +116,7 @@ module VagrantPlugins
def upload_encrypted_data_bag_secret def upload_encrypted_data_bag_secret
@machine.env.ui.info I18n.t("vagrant.provisioners.chef.upload_encrypted_data_bag_secret_key") @machine.env.ui.info I18n.t("vagrant.provisioners.chef.upload_encrypted_data_bag_secret_key")
@machine.communicate.tap do |comm| @machine.communicate.tap do |comm|
comm.sudo("rm #{@config.encrypted_data_bag_secret}", :error_check => false) comm.sudo("rm -f #{@config.encrypted_data_bag_secret}", :error_check => false)
comm.upload(encrypted_data_bag_secret_key_path, comm.upload(encrypted_data_bag_secret_key_path,
@config.encrypted_data_bag_secret) @config.encrypted_data_bag_secret)
end end