When provisioning a vagrant box with (hosted-)chef I get the following error:
No such file or directory - file not found \'/tmp/encrypted_data_bag_secret\'
<
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:
chef.encrypted_data_bag_secret
is deprecated, and setting it has no effect./tmp/vagrant-chef-2/encrypted_data_bag_secret_key
, instead of defaulting to /etc/chef/encrypted_data_bag_secret
as it did initially.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