src.nth.io/

summaryrefslogtreecommitdiff
path: root/prometheus/rpi-client/tasks/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'prometheus/rpi-client/tasks/main.yaml')
-rw-r--r--prometheus/rpi-client/tasks/main.yaml8
1 files changed, 7 insertions, 1 deletions
diff --git a/prometheus/rpi-client/tasks/main.yaml b/prometheus/rpi-client/tasks/main.yaml
index 05102f6..f2dded9 100644
--- a/prometheus/rpi-client/tasks/main.yaml
+++ b/prometheus/rpi-client/tasks/main.yaml
@@ -9,6 +9,7 @@
src: "{{prometheus_client_rpi_src}}"
remote_src: yes
dest: "/tmp/"
+ notify: restart rpi_exporter
- name: install systemd service for rpi-exporter
become: yes
@@ -16,13 +17,17 @@
src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service"
remote_src: yes
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 --collector.gpu=false"
+ 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
@@ -31,6 +36,7 @@
remote_src: yes
dest: "/usr/local/bin/rpi_exporter"
mode: "0755"
+ notify: restart rpi_exporter
- name: ensure systemd service is started
become: yes