Created
May 28, 2014 15:52
-
-
Save gionn/bb4a8f4bfba142079d8d to your computer and use it in GitHub Desktop.
Chef mysql example recipe
This file contains hidden or 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
node.set['mysql']['server_root_password'] = 'yolo' | |
node.set['mysql']['port'] = '3308' | |
node.set['mysql']['data_dir'] = '/data' | |
include_recipe 'mysql::server' | |
mysql_connection_info = { | |
:host => 'localhost', | |
:username => 'root', | |
:password => node['mysql']['server_root_password'] | |
} | |
mysql_database 'foo' do | |
connection mysql_connection_info | |
action :create | |
end | |
mysql_database_user 'app' do | |
connection mysql_connection_info | |
database_name 'foo' | |
password 'super_secret' | |
action [:create, :grant] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment