minecraft/tasks/main.yaml
changeset 27 8fddefdd948b
parent 20 9cacee5eec83
--- a/minecraft/tasks/main.yaml	Sat May 16 10:07:24 2020 -0500
+++ b/minecraft/tasks/main.yaml	Sat May 16 10:23:01 2020 -0500
@@ -26,7 +26,9 @@
   loop:
     - "eula.txt"
     - "ops.json"
+  notify: restart minecraft
 
+# minecraft server writes a timtestamp to the config every time it starts so this always generates a change.
 - name: configure minecraft
   become: yes
   template:
@@ -34,13 +36,14 @@
     dest: "{{minecraft_dir}}/server.properties"
     owner: "{{minecraft_user}}"
     group: "{{minecraft_user}}"
-  notify: restart minecraft
+  changed_when: false
 
 - name: install systemd service
   become: yes
   template:
     src: "minecraft.service.j2"
     dest: "/lib/systemd/system/minecraft.service"
+  notify: restart minecraft
 
 - name: ensure service is started
   become: yes