provisioners/chef-solo: delete data bag secret [GH-2712]
This commit is contained in:
parent
54f4cffc00
commit
7f5c85cf20
|
@ -3,6 +3,8 @@
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
|
||||||
- guests/linux: emit upstart event when NFS folders are mounted. [GH-2705]
|
- 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:
|
BUG FIXES:
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ module VagrantPlugins
|
||||||
setup_json
|
setup_json
|
||||||
setup_solo_config
|
setup_solo_config
|
||||||
run_chef_solo
|
run_chef_solo
|
||||||
|
delete_encrypted_data_bag_secret
|
||||||
end
|
end
|
||||||
|
|
||||||
# Converts paths to a list of properly expanded paths with types.
|
# Converts paths to a list of properly expanded paths with types.
|
||||||
|
@ -113,6 +114,12 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
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
|
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|
|
||||||
|
|
Loading…
Reference in New Issue