summaryrefslogtreecommitdiffstats
path: root/salt/profile/matterbridge/init.sls
diff options
context:
space:
mode:
authorPratyush Desai2023-02-09 20:44:03 +0100
committerPratyush Desai2023-02-09 20:44:03 +0100
commitdee3e035c22ba80748aee773f92618777e592382 (patch)
tree68d56b112552d174319b474997308d3f1a65143f /salt/profile/matterbridge/init.sls
parentf7893a980e14f9b59e5cc99b2e9b536696808018 (diff)
parent650854fa2730c6f61a3f7117d7271907e4a2a587 (diff)
downloadsalt-dee3e035c22ba80748aee773f92618777e592382.tar.gz
salt-dee3e035c22ba80748aee773f92618777e592382.tar.bz2
salt-dee3e035c22ba80748aee773f92618777e592382.zip
Merge pull request 'Refactor Matterbridge profile' (#11) from matterbridge-refactor into production
Reviewed-on: https://git.com.de/LibertaCasa/salt/pulls/11
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