Add mysql class to etherpad to optionally configure db

Change-Id: Ib97188f3597fccf3d0a7b6f6e394ae6bacb12f65
This commit is contained in:
Yolanda Robla 2015-10-13 12:53:23 +02:00
parent 957ecb6cef
commit e13b488671
1 changed files with 30 additions and 0 deletions

30
manifests/mysql.pp Normal file
View File

@ -0,0 +1,30 @@
# == Class: puppet-etherpad_lite::mysql
#
class etherpad_lite::mysql(
$mysql_root_password,
$database_name = 'etherpad-lite',
$database_user = 'eplite',
$database_password,
) {
class { '::mysql::server':
config_hash => {
'root_password' => $mysql_root_password,
'default_engine' => 'InnoDB',
'bind_address' => '127.0.0.1',
}
}
include ::mysql::server::account_security
mysql::db { $database_name:
user => $database_user,
password => $database_password,
host => 'localhost',
grant => ['all'],
charset => 'utf8',
require => [
Class['mysql::server'],
Class['mysql::server::account_security'],
],
}
}