From ab47eb5485ebab42a4129eacafd6ea96c1dbe512 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 12 Feb 2023 00:51:26 +0100 Subject: matterbridge: manage media directories Create media directories if defined in the pillar. Signed-off-by: Georg Pfuetzenreuter --- salt/profile/matterbridge/init.sls | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'salt') diff --git a/salt/profile/matterbridge/init.sls b/salt/profile/matterbridge/init.sls index 1e0cd51..a68de46 100644 --- a/salt/profile/matterbridge/init.sls +++ b/salt/profile/matterbridge/init.sls @@ -37,6 +37,17 @@ matterbridge_files: {%- endfor %} {%- for instance in instances %} +{%- if 'general' in instances[instance] and 'MediaDownloadPath' in instances[instance]['general'] %} +matterbridge_{{ instance }}_mediadir: + file.directory: + - name: {{ instances[instance]['general']['MediaDownloadPath'] }} + - user: matterbridge + {#- to-do: implement some shared group #} + - group: lighttpd + - mode: 750 + - makedirs: True +{%- endif %} + matterbridge_{{ instance }}_service: service.running: - name: matterbridge@{{ instance }}.service -- cgit v1.2.3