summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYolanda Robla <yolanda.robla-mota@hp.com>2015-10-13 12:53:23 +0200
committerYolanda Robla <yolanda.robla-mota@hp.com>2015-10-13 20:08:10 +0200
commite13b488671c28689c0c3fb56e36cf5e7de5fcd7d (patch)
tree7c68d1b0ea83f3301a5a41b34988f52d4f6e7e96
parent957ecb6ceffd3180bc6c53b2abf77eddc3090b9d (diff)
Add mysql class to etherpad to optionally configure db
Notes
Notes (review): Code-Review+1: Danilo Ramalho <dramalho@thoughtworks.com> Code-Review+2: Spencer Krum <nibz@spencerkrum.com> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 12 Nov 2015 16:37:06 +0000 Reviewed-on: https://review.openstack.org/234184 Project: openstack-infra/puppet-ethercalc Branch: refs/heads/master
-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}