Browse Source

Store system status in /etc/freifunk/status

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 1 year ago
parent
commit
49c976e932
1 changed files with 7 additions and 0 deletions
  1. 7 0
      ffinfo/init.sls

+ 7 - 0
ffinfo/init.sls

@@ -27,3 +27,10 @@
     - source: salt://ffinfo/list.tmpl
     - template: jinja
       list: {{ salt['pillar.get']('nodes:' ~ grains['id'] ~ ':sites', []) }}
+
+
+# Generate /etc/freifunk/status file with the status of this node
+{% set status = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':status', 'active') %}
+/etc/freifunk/status:
+  file.managed:
+    - contents: {{ status }}