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

前端 未结 2 1077
不知归路
不知归路 2020-12-29 06:56

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\'
<         


        
相关标签:
2条回答
  • 2020-12-29 07:12

    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.
    0 讨论(0)
  • 2020-12-29 07:13

    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
    
    0 讨论(0)
提交回复
热议问题