summaryrefslogtreecommitdiffstats
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp18
1 files changed, 10 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a5de0dc..3e9f6bc 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -79,13 +79,17 @@ class mysql::standalone inherits mysql::server {
}
}
-class mysql::M2S inherits mysql::server {
+class mysql::m2s inherits mysql::server {
mysql::mysql_config {"set binary logging":
binary_logging => true,
}
-
- mysql::mysql_replication {"Configure Master Server for Master to Slave Replication",
+
+ exec { "restart mysql server":
+ command => "service mysql restart",
+ unless => "$mysql_cmd_repl_with_pwd --execute=\"show master status;\" | grep mysqllog",
+ require => Service ["mysql"],
}
+
}
class mysql::slave inherits mysql::server {
@@ -93,17 +97,15 @@ class mysql::slave inherits mysql::server {
binary_logging => false,
}
- mysql::mysql_replication {"Configure Slave Server for Replication",
- }
+ mysql::mysql_replication {"Configure Slave Server for Replication":}
}
-class mysql::M2M inherits mysql::server {
+class mysql::m2m inherits mysql::server {
mysql::mysql_config {"set binary logging":
binary_logging => true,
}
- mysql::mysql_replication {"Configure Master Server for Master to Master Replication",
- }
+ mysql::mysql_replication {"Configure Master Server for Master to Master Replication": }
}
define mysql::mysql_config($binary_logging){