Browse Source

Add mysql class to etherpad to optionally configure db

Change-Id: Ib97188f3597fccf3d0a7b6f6e394ae6bacb12f65
Yolanda Robla 3 years ago
parent
commit
e13b488671
1 changed files with 30 additions and 0 deletions
  1. 30
    0
      manifests/mysql.pp

+ 30
- 0
manifests/mysql.pp View File

@@ -0,0 +1,30 @@
1
+# == Class: puppet-etherpad_lite::mysql
2
+#
3
+class 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
+}

Loading…
Cancel
Save