Fixed some bugs with prometheus node exporter not starting.
authorLuke Hoersten <luke@hoersten.org>
Sat, 02 May 2020 11:38:57 -0500
changeset 15 6d7db9bae6c2
parent 14 47937f95ac26
child 16 c2ff7e33d1e5
Fixed some bugs with prometheus node exporter not starting.
prometheus/client/tasks/main.yaml
prometheus/rpi-client/defaults/main.yaml
prometheus/rpi-client/tasks/main.yaml
--- a/prometheus/client/tasks/main.yaml	Fri May 01 19:17:43 2020 -0500
+++ b/prometheus/client/tasks/main.yaml	Sat May 02 11:38:57 2020 -0500
@@ -4,6 +4,10 @@
   become: yes
   apt: name="prometheus-node-exporter"
 
+- name: ensure prometheus node exporter is started
+  become: yes
+  systemd: name="prometheus-node-exporter.service" enabled="yes" state="started"
+
 #   # Nginx
 # - name: check if running nginx
 #   stat: path="/etc/nginx/"
--- a/prometheus/rpi-client/defaults/main.yaml	Fri May 01 19:17:43 2020 -0500
+++ b/prometheus/rpi-client/defaults/main.yaml	Sat May 02 11:38:57 2020 -0500
@@ -2,4 +2,6 @@
 
 prometheus_client_rpi_exporter_version: "0.6.0"
 prometheus_client_arch: "{{ansible_architecture}}"
+
+prometheus_client_rpi_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"
 prometheus_client_rpi_dest: "rpi_exporter-{{prometheus_client_rpi_exporter_version}}.linux-{{prometheus_client_arch}}"
--- a/prometheus/rpi-client/tasks/main.yaml	Fri May 01 19:17:43 2020 -0500
+++ b/prometheus/rpi-client/tasks/main.yaml	Sat May 02 11:38:57 2020 -0500
@@ -6,7 +6,7 @@
 
 - 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"
+    src: "{{prometheus_client_rpi_src}}"
     remote_src: yes
     dest: "/tmp/"