Skip to content

Instantly share code, notes, and snippets.

@dougireton
Last active December 15, 2015 19:19
Show Gist options
  • Save dougireton/5310567 to your computer and use it in GitHub Desktop.
Save dougireton/5310567 to your computer and use it in GitHub Desktop.
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