'': { 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":
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'] ],
}
}