src.nth.io/

summaryrefslogtreecommitdiff
path: root/prometheus/rpi-client/tasks
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2020-02-09 20:56:26 -0600
committerLuke Hoersten <[email protected]>2020-02-09 20:56:26 -0600
commit827bfe78ba170882d3d9bf7a12a62a4b6e733805 (patch)
tree7bc69eba9f61f5f859f41d5e504353edf36b4951 /prometheus/rpi-client/tasks
parent9ad705198a34f645bc9cc61512965fb9547d8aad (diff)
Updated prometheus roles. WIP psql, nginx exporters.
Diffstat (limited to 'prometheus/rpi-client/tasks')
-rw-r--r--prometheus/rpi-client/tasks/main.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/prometheus/rpi-client/tasks/main.yaml b/prometheus/rpi-client/tasks/main.yaml
new file mode 100644
index 0000000..a5cc8e0
--- /dev/null
+++ b/prometheus/rpi-client/tasks/main.yaml
@@ -0,0 +1,30 @@
+---
+
+- 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: "https://github.com/lukasmalkmus/rpi_exporter/releases/download/v{{prometheus_client_rpi_exporter_version}}/rpi_exporter-{{prometheus_client_rpi_exporter_version}}.linux-{{prometheus_client_arch}}.tar.gz"
+ 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: 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"