How to encrypt databags and use them in recipes for chef solo

211 Views Asked by At

All I want is to encrypt my passwords that I am using inside recipes. I am using chef-solo. Databags with chef-solo looks promising but i didn't encounter any step by step tutorial helping me to understand the same I found a couple of blogs online but nothing working for me. I tried encrypting creating databag items

EDITOR=vi knife solo data bag create apps  --json-file "/Users/akthakur/Documents/Code/chef-playground/certification/lcd_web/secrets.json" --secret-file "~/.chef/encrypted_data_bag_secret"
ERROR: TypeError: no implicit conversion of Array into String

but everything failing. Any tutorial or guide , bloglink is much appreciated.

I even followed this https://github.com/thbishop/knife-solo_data_bag

but all commands give me same error.

knife solo data bag create apps app_1
ERROR: TypeError: no implicit conversion of Array into String
1

There are 1 best solutions below

0
On

I had the same error.

I fixed it by adding into my knife.rb file the following

data_bag_path           "/opt/chef/data_bag"