Skip to content

Instantly share code, notes, and snippets.

@TranscriptsHQ
Created December 21, 2013 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TranscriptsHQ/8065197 to your computer and use it in GitHub Desktop.
Save TranscriptsHQ/8065197 to your computer and use it in GitHub Desktop.
# Customization: get passwords from encrypted data bag
secrets = Chef::EncryptedDataBagItem.load("secrets", "mysql")
if secrets && mysql_passwords = secrets[node.chef_environment]
node.default['mysql']['server_root_password'] = mysql_passwords['root']
node.default['mysql']['server_debian_password'] = mysql_passwords['debian']
node.default['mysql']['server_repl_password'] = mysql_passwords['repl']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment