Set u+w perms on private keys in tmp dir.

This should allow additional `vagrant provision` calls to work when
using the salt provisioner and providing private keys. See #3542.
This commit is contained in:
Timothy Messier 2014-04-29 10:28:57 -04:00
parent 0a11ecebb1
commit 513a9bf1ab
1 changed files with 2 additions and 0 deletions

View File

@ -159,12 +159,14 @@ module VagrantPlugins
if @config.minion_key and @config.minion_pub
@machine.env.ui.info "Uploading minion keys."
@machine.communicate.upload(expanded_path(@config.minion_key).to_s, temp_config_dir + "/minion.pem")
@machine.communicate.sudo("chmod u+w #{temp_config_dir}/minion.pem")
@machine.communicate.upload(expanded_path(@config.minion_pub).to_s, temp_config_dir + "/minion.pub")
end
if @config.master_key and @config.master_pub
@machine.env.ui.info "Uploading master keys."
@machine.communicate.upload(expanded_path(@config.master_key).to_s, temp_config_dir + "/master.pem")
@machine.communicate.sudo("chmod u+w #{temp_config_dir}/master.pem")
@machine.communicate.upload(expanded_path(@config.master_pub).to_s, temp_config_dir + "/master.pub")
end
end