From 7f1653d8816127cd9ca862ae84c281d22ea9e357 Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 25 Jun 2020 08:57:58 -0500 Subject: [PATCH] Stop server before recovery --- roles/minecraft/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/minecraft/tasks/main.yml b/roles/minecraft/tasks/main.yml index d8e7cae..ccda925 100644 --- a/roles/minecraft/tasks/main.yml +++ b/roles/minecraft/tasks/main.yml @@ -133,6 +133,10 @@ register: stat_mcroot_world - name: Recover world, if available block: + - name: Stop server + systemd: + name: "minecraft@{{ mcname }}" + state: stopped - name: Run recover script command: chdir: "/var/minecraft/{{ mcname }}"