From e13b488671c28689c0c3fb56e36cf5e7de5fcd7d Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 13 Oct 2015 12:53:23 +0200 Subject: [PATCH] Add mysql class to etherpad to optionally configure db Change-Id: Ib97188f3597fccf3d0a7b6f6e394ae6bacb12f65 --- manifests/mysql.pp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 manifests/mysql.pp diff --git a/manifests/mysql.pp b/manifests/mysql.pp new file mode 100644 index 0000000..cb12a62 --- /dev/null +++ b/manifests/mysql.pp @@ -0,0 +1,30 @@ +# == Class: puppet-etherpad_lite::mysql +# +class etherpad_lite::mysql( + $mysql_root_password, + $database_name = 'etherpad-lite', + $database_user = 'eplite', + $database_password, +) { + class { '::mysql::server': + config_hash => { + 'root_password' => $mysql_root_password, + 'default_engine' => 'InnoDB', + 'bind_address' => '127.0.0.1', + } + } + + include ::mysql::server::account_security + + mysql::db { $database_name: + user => $database_user, + password => $database_password, + host => 'localhost', + grant => ['all'], + charset => 'utf8', + require => [ + Class['mysql::server'], + Class['mysql::server::account_security'], + ], + } +}