Remove dna and data bag secret prior to upload in Chef [GH-1111]
This commit is contained in:
parent
78ef3ded2b
commit
dd6dd4929e
|
@ -18,6 +18,8 @@ BUG FIXES:
|
||||||
- Boxes downloaded as part of `vagrant up` are now done so _prior_ to
|
- Boxes downloaded as part of `vagrant up` are now done so _prior_ to
|
||||||
config validation. This allows Vagrantfiles to references files that
|
config validation. This allows Vagrantfiles to references files that
|
||||||
may be in the box itself. [GH-1061]
|
may be in the box itself. [GH-1061]
|
||||||
|
- Chef removes dna.json and encrypted data bag secret file prior to
|
||||||
|
uploading. [GH-1111]
|
||||||
- NFS synced folders exporting sub-directories of other exported folders now
|
- NFS synced folders exporting sub-directories of other exported folders now
|
||||||
works properly. [GH-785]
|
works properly. [GH-785]
|
||||||
- NFS shared folders properly dereference symlinks so that the real path
|
- NFS shared folders properly dereference symlinks so that the real path
|
||||||
|
|
|
@ -97,7 +97,11 @@ module VagrantPlugins
|
||||||
temp.write(json)
|
temp.write(json)
|
||||||
temp.close
|
temp.close
|
||||||
|
|
||||||
@machine.communicate.upload(temp.path, File.join(@config.provisioning_path, "dna.json"))
|
remote_file = File.join(@config.provisioning_path, "dna.json")
|
||||||
|
@machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("rm #{remote_file}", :error_check => false)
|
||||||
|
comm.upload(temp.path, remote_file)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -114,8 +114,11 @@ 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.upload(encrypted_data_bag_secret_key_path,
|
@machine.communicate.tap do |comm|
|
||||||
@config.encrypted_data_bag_secret)
|
comm.sudo("rm #{@config.encrypted_data_bag_secret}", :error_check => false)
|
||||||
|
comm.upload(encrypted_data_bag_secret_key_path,
|
||||||
|
@config.encrypted_data_bag_secret)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_solo_config
|
def setup_solo_config
|
||||||
|
|
Loading…
Reference in New Issue