matterbridge: manage media directories

Create media directories if defined in the pillar.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-02-12 00:51:26 +01:00
parent e2560f0dd6
commit ab47eb5485
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -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