Last active
December 15, 2015 19:19
-
-
Save dougireton/5310567 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
chef_gem "chef-vault" | |
require 'chef-vault' | |
# given a 'passwords' data bag | |
vault = ChefVault.new("passwords") | |
# get the 'Administrator' data bag item | |
user = vault.user("Administrator") | |
# decrypt the user's password | |
password = user.decrypt_password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment