summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-26 14:15:27 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-26 14:15:27 -0200
commit4526b72d6be7a3f07555c7a5d9d5c587ea32e1e0 (patch)
treef0e78d92499946d70f45c5b5970ec7e1da2b4ec1
parenta005628dbfd2d3e30115b03d3c7e08e354496880 (diff)
downloadpuppet-etherpad-4526b72d6be7a3f07555c7a5d9d5c587ea32e1e0.tar.gz
puppet-etherpad-4526b72d6be7a3f07555c7a5d9d5c587ea32e1e0.tar.bz2
Fixing database definitions
-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'] ],
}
}