summaryrefslogtreecommitdiffstats
path: root/salt/profile/matterbridge/init.sls
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-07 22:20:39 +0100
committerGeorg Pfuetzenreuter2023-02-07 22:37:37 +0100
commit650854fa2730c6f61a3f7117d7271907e4a2a587 (patch)
tree207e960cfc0735af7ff1f499d3e618f9e0e964e5 /salt/profile/matterbridge/init.sls
parentf678de8560780ecdeca18d0251136142ef74b701 (diff)
downloadsalt-650854fa2730c6f61a3f7117d7271907e4a2a587.tar.gz
salt-650854fa2730c6f61a3f7117d7271907e4a2a587.tar.bz2
salt-650854fa2730c6f61a3f7117d7271907e4a2a587.zip
Refactor matterbridge profile
- reduce pillar calls - no longer define possible configuration options, apply settings from pillar 1:1 Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile/matterbridge/init.sls')
-rw-r--r--salt/profile/matterbridge/init.sls9
1 files changed, 7 insertions, 2 deletions
diff --git a/salt/profile/matterbridge/init.sls b/salt/profile/matterbridge/init.sls
index eee6df2..1e0cd51 100644
--- a/salt/profile/matterbridge/init.sls
+++ b/salt/profile/matterbridge/init.sls
@@ -1,5 +1,5 @@
-{%- set mypillar = 'profile:matterbridge' -%}
-{%- set instances = salt['pillar.get'](mypillar ~ ':instances') or [] -%}
+{%- set mypillar = salt['pillar.get']('profile:matterbridge') -%}
+{%- set instances = mypillar['instances'] | default([]) -%}
matterbridge_packages:
pkg.installed:
@@ -31,7 +31,12 @@ matterbridge_files:
- /etc/matterbridge/{{ instance }}.toml:
- context:
instance: {{ instance }}
+ general: {{ instances[instance]['general'] | default({}) }}
+ accounts: {{ instances[instance]['accounts'] }}
+ gateways: {{ instances[instance]['gateways'] }}
+{%- endfor %}
+{%- for instance in instances %}
matterbridge_{{ instance }}_service:
service.running:
- name: matterbridge@{{ instance }}.service