Created
November 14, 2014 09:14
-
-
Save josqu4red/274bc9521d0173f0cae3 to your computer and use it in GitHub Desktop.
Convenient wrapper for Chef encrypted data bags
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
class Chef | |
module DSL | |
module DataQuery | |
def encrypted_data_bag_item(bag, item) | |
secret = Chef::EncryptedDataBagItem.load_secret(File.join(node["chef"]["config_dir"], "encrypted_databags_secrets", bag, item)) | |
Chef::EncryptedDataBagItem.load(bag, item, secret) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment