ruby - Iterating over EncryptedDataBagItem in Chef Recipe -


i decrypt chef data bag item (named passwords) , store of attributes in temporary json file read (and deleted) node.js app. there way iterate on attributes of data bag item , values?

plain_data = chef::encrypteddatabagitem.load("/home/me/data_bags/secrets/passwords.json", secret_key) 

since encrypteddatabagitem class not have each method, there workaround? don't want store each password in separate json file (data bag item).

why not like:

decrypted_item = data_bag_item('secrets',                                 'passwords',                                  node['my_repo_name']['secret_key_file_path'])  file '/opt/me/passwords.json'   content decrypted_item.to_hash.to_json   mode 600 end 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -