rpi-export: disable gpu temp before systemd config.
authorLuke Hoersten <luke@hoersten.org>
Sat, 16 May 2020 09:44:05 -0500
changeset 24 c0dde2a4b276
parent 23 b4ad03deace1
child 25 b4e52ddd1210
rpi-export: disable gpu temp before systemd config.
prometheus/rpi-client/tasks/main.yaml
--- a/prometheus/rpi-client/tasks/main.yaml	Thu May 14 08:25:10 2020 -0500
+++ b/prometheus/rpi-client/tasks/main.yaml	Sat May 16 09:44:05 2020 -0500
@@ -11,6 +11,14 @@
     dest: "/tmp/"
   notify: restart rpi_exporter
 
+- name: disable GPU temp scraping
+  become: yes
+  lineinfile:
+    path: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service"
+    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
+
 - name: install systemd service for rpi-exporter
   become: yes
   copy:
@@ -19,16 +27,6 @@
     dest: "/lib/systemd/system/rpi_exporter.service"
   notify: restart rpi_exporter
 
-- name: disable GPU temp scraping
-  become: yes
-  lineinfile:
-    path: "/lib/systemd/system/rpi_exporter.service"
-    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
-  notify: restart rpi_exporter
-
-
 - name: install rpi-exporter binary
   become: yes
   copy: