Chef on Vagrant Box: Can't find encrypted data bag secret

回眸只為那壹抹淺笑 提交于 2019-11-30 03:16:48

When provisioning a vagrant box, you have to provide a path to your data bags secret key, if you want to use encrypted data bags.

config.vm.provision :chef_solo do |chef|
  [...]
  chef.encrypted_data_bag_secret_key_path = '/etc/chef/encrypted_data_bag_secret'
  [...]
end

Quick amendment to Thomas Obermüller's response to Draco Ater's answer above. In Vagrant 1.5.1 through Vagrant 1.6.5 (and possibly earlier than 1.5.1; I didn't try it), there are a couple of changes:

  1. chef.encrypted_data_bag_secret is deprecated, and setting it has no effect.
  2. Vagrant puts the encrypted key at /tmp/vagrant-chef-2/encrypted_data_bag_secret_key, instead of defaulting to /etc/chef/encrypted_data_bag_secret as it did initially.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!