From: Silvio Rhatto Date: Mon, 26 Dec 2011 16:15:27 +0000 (-0200) Subject: Fixing database definitions X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4526b72d6be7a3f07555c7a5d9d5c587ea32e1e0;p=puppet-etherpad.git Fixing database definitions --- 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'] ], } }