[legacy-of-lunatic-kingdom] allow /mnt in node-exporter
change tsnktwsnumwozuypkzzunnpxwlnvkltu
commit 93a191b19993961955bcef86cbba3df46f91291c
author Alpha Chen <alpha@kejadlen.dev>
date
parent nxrmpmrz
diff --git a/legacy-of-lunatic-kingdom/main.yml b/legacy-of-lunatic-kingdom/main.yml
index 820708e..a2609a4 100644
--- a/legacy-of-lunatic-kingdom/main.yml
+++ b/legacy-of-lunatic-kingdom/main.yml
@@ -14,6 +14,20 @@
         state: present
         update_cache: true
 
+    - name: Include /mnt in node-exporter
+      lineinfile:
+        path: /etc/default/prometheus-node-exporter
+        regexp: '^ARGS='
+        line: 'ARGS="--collector.filesystem.mount-points-exclude=^/(dev|proc|run|sys|media|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)"'
+        create: yes
+      notify: Restart node exporter
+
+  handlers:
+    - name: Restart node exporter
+      systemd:
+        name: prometheus-node-exporter
+        state: restarted
+
 # TODO Standardize these into a shared playbook
 - name: Secure the system
   hosts: legacy-of-lunatic-kingdom
@@ -49,4 +63,8 @@
 - import_playbook: ../playbooks/docker.yml    # noqa: name[play]
 - import_playbook: ../playbooks/syncthing.yml # noqa: name[play]
 
+# TODO
+# - minio
+# - restic
+
 # vim: ft=yaml.ansible