summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp18
1 files changed, 14 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a467472..927be2d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -3,8 +3,19 @@ class etherpad {
'': { fail("You need to define etherpad database password! Please set \$etherpad_db_password in your site.pp or host config") }
}
- database::instance { "etherpad":
- password => $etherpad_db_password,
+ mysql_database { 'etherpad':
+ ensure => present,
+ }
+
+ mysql_user { "etherpad@%":
+ ensure => present,
+ password_hash => mysql_password($etherpad_db_password),
+ require => Mysql_database['etherpad'],
+ }
+
+ mysql_grant { "etherpad@%/etherpad":
+ privileges => 'all',
+ require => Mysql_user["etherpad@%"],
}
user { "etherpad-lite":
@@ -74,7 +85,6 @@ class etherpad {
hasrestart => true,
hasstatus => true,
require => [ File['/etc/init.d/etherpad-lite', '/var/lib/etherpad-lite/settings.json'],
- Mysql_database['etherpad'], Mysql_user['etherpad'],
- Mysql_grant['etherpad'], Package['npm'] ],
+ Mysql_grant['etherpad@%/etherpad'], Package['npm'] ],
}
}