diff options
Diffstat (limited to 'salt/profile/matterbridge/init.sls')
-rw-r--r-- | salt/profile/matterbridge/init.sls | 9 |
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 |