summaryrefslogtreecommitdiffstats
path: root/salt/profile/matterbridge/init.sls
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-12 00:51:26 +0100
committerGeorg Pfuetzenreuter2023-02-12 00:51:26 +0100
commitab47eb5485ebab42a4129eacafd6ea96c1dbe512 (patch)
tree6b0971548af2a3dc3156e76fb1ccdbb3086dca05 /salt/profile/matterbridge/init.sls
parente2560f0dd665993c52eaaecb77445b299f7ddd19 (diff)
downloadsalt-ab47eb5485ebab42a4129eacafd6ea96c1dbe512.tar.gz
salt-ab47eb5485ebab42a4129eacafd6ea96c1dbe512.tar.bz2
salt-ab47eb5485ebab42a4129eacafd6ea96c1dbe512.zip
matterbridge: manage media directories
Create media directories if defined in the pillar. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile/matterbridge/init.sls')
-rw-r--r--salt/profile/matterbridge/init.sls11
1 files changed, 11 insertions, 0 deletions
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