Skip to content

Instantly share code, notes, and snippets.

@zipkid
Created January 22, 2014 22:06
Show Gist options
  • Save zipkid/8568367 to your computer and use it in GitHub Desktop.
Save zipkid/8568367 to your computer and use it in GitHub Desktop.
$users = {
'gitlab_user@localhost' => {
ensure => 'present',
password_hash => mysql_password('changeme'),
},
}
$grants = {
'gitlab_user@localhost/gitlab_db.*' => {
ensure => 'present',
options => ['GRANT'],
privileges => ['ALL'],
table => 'gitlab_db.*',
user => 'gitlab_user@localhost',
},
}
$databases = {
'gitlab_db' => {
ensure => 'present',
charset => 'utf8',
},
}
class { '::mysql::server':
users => $users,
grants => $grants,
databases => $databases,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment