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
This commit is contained in:
Kyle L. Henderson 2016-10-13 19:50:57 -05:00
parent 81f2f88fbf
commit 678128f13a
1 changed files with 5 additions and 5 deletions

View File

@ -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"