summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index c840baa..ca7894a 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -150,6 +150,12 @@ class mysql::slave inherits mysql::server {
require => File["/var/lib/mysql/gather_master_data.bash"],
}
+ exec { "restart mysql server":
+ command => "service mysql restart",
+ unless => "$mysql_cmd_repl_with_pwd --execute=\"show slave status;\" | grep Wait",
+ require => Exec["set master data for slave"],
+ }
+
exec { "start slave server":
command => "$mysql_cmd_repl_with_pwd --execute=\"start slave;\"",
unless => "$mysql_cmd_repl_with_pwd --execute=\"show slave status;\" | grep Wait",