More fixes
authorLuke Hoersten <luke@hoersten.org>
Sat, 16 May 2020 10:23:01 -0500
changeset 27 8fddefdd948b
parent 26 b0e4ad2f4291
child 28 d289eab1ea52
More fixes
minecraft/tasks/main.yaml
prometheus/rpi-client/tasks/main.yaml
writefreely/tasks/main.yaml
--- 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
--- a/prometheus/rpi-client/tasks/main.yaml	Sat May 16 10:07:24 2020 -0500
+++ b/prometheus/rpi-client/tasks/main.yaml	Sat May 16 10:23:01 2020 -0500
@@ -18,6 +18,7 @@
     regexp: "^ExecStart=/usr/local/bin/rpi_exporter"
     line: "ExecStart=/usr/local/bin/rpi_exporter --no-collector.gpu"
   when: not prometheus_client_rpi_collect_gpu_temp
+  changed_when: false
 
 - name: install systemd service for rpi-exporter
   become: yes
--- a/writefreely/tasks/main.yaml	Sat May 16 10:07:24 2020 -0500
+++ b/writefreely/tasks/main.yaml	Sat May 16 10:23:01 2020 -0500
@@ -76,7 +76,7 @@
   command: "writefreely keys gen"
   args:
     chdir: "{{writefreely_dir}}/{{writefreely_instance}}/"
-  when: not key_file.stat.exists
+  when: not keys_file.stat.exists
 
 - name: check if db exists
   stat: