From 09276e47e99f52b2cb0e7749051741d702328e71 Mon Sep 17 00:00:00 2001 From: "Kyle L. Henderson" Date: Thu, 13 Oct 2016 19:50:57 -0500 Subject: [PATCH] Move systemd handler above restart handler Since handlers are executed in the order in which they are defined the handler to restart systemd should come before the handlers to restart mysql. This avoids the error case where the playbook is run multiple times and systemd refuses to restart mysql giving the following message: "Warning: mysql.service changed on disk. Run 'systemctl daemon-reload' to reload units." Closes-Bug: #1633472 Change-Id: I3962c0e8f9f1cf3c01a3160be4c744e9fbd1ecfe (cherry picked from commit 678128f13ad22308819c83a208beeec8ea109b0f) --- handlers/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 6488b3f7..27fd3525 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Reload the systemd daemon + command: "systemctl daemon-reload" + when: + - pid1_name == "systemd" + - name: Restart mysql service: name: mysql @@ -53,8 +58,3 @@ until: galera_restart_fall_back | success retries: 3 delay: 5 - -- name: Reload the systemd daemon - command: "systemctl daemon-reload" - when: - - pid1_name == "systemd"