summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-12 16:37:06 +0000
committerGerrit Code Review <review@openstack.org>2015-11-12 16:37:06 +0000
commit872d388f6aa289d9dd0f167c49a50bf6e6e0322e (patch)
tree1b46cf809da70f016521d1001fd57a362b84e0da
parent6e9a5f5ef952dc4bfc8d8ed58085ba6f9020dac7 (diff)
parente13b488671c28689c0c3fb56e36cf5e7de5fcd7d (diff)
Merge "Add mysql class to etherpad to optionally configure db"
-rw-r--r--manifests/mysql.pp30
1 files changed, 30 insertions, 0 deletions
diff --git a/manifests/mysql.pp b/manifests/mysql.pp
new file mode 100644
index 0000000..cb12a62
--- /dev/null
+++ b/manifests/mysql.pp
@@ -0,0 +1,30 @@
1# == Class: puppet-etherpad_lite::mysql
2#
3class etherpad_lite::mysql(
4 $mysql_root_password,
5 $database_name = 'etherpad-lite',
6 $database_user = 'eplite',
7 $database_password,
8) {
9 class { '::mysql::server':
10 config_hash => {
11 'root_password' => $mysql_root_password,
12 'default_engine' => 'InnoDB',
13 'bind_address' => '127.0.0.1',
14 }
15 }
16
17 include ::mysql::server::account_security
18
19 mysql::db { $database_name:
20 user => $database_user,
21 password => $database_password,
22 host => 'localhost',
23 grant => ['all'],
24 charset => 'utf8',
25 require => [
26 Class['mysql::server'],
27 Class['mysql::server::account_security'],
28 ],
29 }
30}