diff --git a/manifests/mariadb.pp b/manifests/mariadb.pp index 81f1cf2..d84ec27 100644 --- a/manifests/mariadb.pp +++ b/manifests/mariadb.pp @@ -4,7 +4,8 @@ class sunetdrive::mariadb ( $location = undef, $tag_mariadb = undef, $override_config = undef, - $override_compose = undef + $override_compose = undef, + $replicate_rewrite_db = undef, ) { $quorum_id = $::fqdn diff --git a/templates/mariadb/my.cnf.erb b/templates/mariadb/my.cnf.erb index 81892bb..2892c01 100644 --- a/templates/mariadb/my.cnf.erb +++ b/templates/mariadb/my.cnf.erb @@ -19,6 +19,10 @@ gtid_strict_mode = ON log_bin = binlog log_slave_updates = ON server_id = <%= @server_id %> +<% if not @replicate_rewrite_db.nil? -%> +replicate-rewrite-db = "<%= @replicate_rewrite_db %>->nextcloud" +replicate-wild-do-table = <%= @replicate_rewrite_db %>.% +<% end -%> # Innodb innodb_autoinc_lock_mode = 2