provisioners/chef-solo: delete data bag secret [GH-2712]

This commit is contained in:
Mitchell Hashimoto 2013-12-31 10:44:08 -08:00
parent 54f4cffc00
commit 7f5c85cf20
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,8 @@
IMPROVEMENTS:
- guests/linux: emit upstart event when NFS folders are mounted. [GH-2705]
- provisioners/chef-solo: Encrypted data bag secret is removed from the
machine after provisioning. [GH-2712]
BUG FIXES:

View File

@ -52,6 +52,7 @@ module VagrantPlugins
setup_json
setup_solo_config
run_chef_solo
delete_encrypted_data_bag_secret
end
# Converts paths to a list of properly expanded paths with types.
@ -113,6 +114,12 @@ module VagrantPlugins
end
end
def delete_encrypted_data_bag_secret
@machine.communicate.tap do |comm|
comm.sudo("rm -f #{@config.encrypted_data_bag_secret}", error_check: false)
end
end
def upload_encrypted_data_bag_secret
@machine.env.ui.info I18n.t("vagrant.provisioners.chef.upload_encrypted_data_bag_secret_key")
@machine.communicate.tap do |comm|