Created
May 2, 2015 21:12
-
-
Save Fodoj/2a88bd8c0417320eea4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secret = Chef::EncryptedDataBagItem.load_secret(Chef::Config[:encrypted_data_bag_secret]) | |
secrets_bag = Chef::EncryptedDataBagItem.load('app-secrets', node['app']['name'], secret) | |
secrets_bag.to_hash.each do |key, value| | |
node.default['app'][key] = case value | |
when Hash | |
Chef::Mixin::DeepMerge.merge(node['app'][key], value) | |
else | |
value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment