Created
December 21, 2013 03:57
-
-
Save TranscriptsHQ/8065197 to your computer and use it in GitHub Desktop.
Update to Chef API 0.8 for http://www.jasongrimes.org/2012/06/provisioning-a-lamp-stack-with-chef-vagrant-and-ec2-2-of-3/#environments
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
# 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