blob: 05102f6a3a88c1c97f17d3650b68f3758dc8980d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
---
- name: add prometheus user to video group for rpi GPU stats
become: yes
user: name="prometheus" groups="video" append="yes"
- name: install prometheus rpi-exporter
unarchive:
src: "{{prometheus_client_rpi_src}}"
remote_src: yes
dest: "/tmp/"
- name: install systemd service for rpi-exporter
become: yes
copy:
src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service"
remote_src: yes
dest: "/lib/systemd/system/rpi_exporter.service"
- 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"
- name: install rpi-exporter binary
become: yes
copy:
src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter"
remote_src: yes
dest: "/usr/local/bin/rpi_exporter"
mode: "0755"
- name: ensure systemd service is started
become: yes
systemd: name="rpi_exporter.service" enabled="yes" state="started"
|