diff options
author | Pratyush Desai | 2023-02-12 00:55:49 +0100 |
---|---|---|
committer | Pratyush Desai | 2023-02-12 00:55:49 +0100 |
commit | c9a157833bd74e29ee49fe654656d6f1896c17c5 (patch) | |
tree | 06b09fab7269214ecfa3cd82ad2b28167fd3e92f | |
parent | e2560f0dd665993c52eaaecb77445b299f7ddd19 (diff) | |
parent | 1aacd3f3403cb8643204a7ea235ea40f7de56de5 (diff) | |
download | salt-c9a157833bd74e29ee49fe654656d6f1896c17c5.tar.gz salt-c9a157833bd74e29ee49fe654656d6f1896c17c5.tar.bz2 salt-c9a157833bd74e29ee49fe654656d6f1896c17c5.zip |
Merge pull request 'Matterbridge media' (#15) from matterbridge-media into production
Reviewed-on: https://git.com.de/LibertaCasa/salt/pulls/15
-rw-r--r-- | pillar/id/dericom02_rigel_lysergic_dev.sls | 15 | ||||
-rw-r--r-- | salt/profile/matterbridge/init.sls | 11 |
2 files changed, 24 insertions, 2 deletions
diff --git a/pillar/id/dericom02_rigel_lysergic_dev.sls b/pillar/id/dericom02_rigel_lysergic_dev.sls index 16792f1..61dcbc4 100644 --- a/pillar/id/dericom02_rigel_lysergic_dev.sls +++ b/pillar/id/dericom02_rigel_lysergic_dev.sls @@ -1,3 +1,5 @@ +{%- set mediapath = '/srv/matterbridge/' -%} + {%- macro discord_common() -%} AutoWebhooks: true EditSuffix: '(edited)' @@ -10,7 +12,7 @@ profile: libertacasa-general: general: MediaDownloadSize: 1000000000 - MediaDownloadPath: /srv/matterbridge/libertacasa-general/media + MediaDownloadPath: {{ mediapath }}libertacasa-general MediaServerDownload: https://load.casa accounts: irc.libertacasa: @@ -88,7 +90,7 @@ profile: IgnoreFailureOnStart: true MessageSplit: true MediaDownloadSize: 1000000000 - MediaDownloadPath: /srv/matterbridge/libertacasa-irc/media + MediaDownloadPath: {{ mediapath }}libertacasa-irc MediaServerDownload: https://irc.load.casa accounts: irc.libertacasa: @@ -219,3 +221,12 @@ profile: irc.libertacasa: '#music' irc.chillnet: '#music' irc.stardust: '#music' + + lighttpd: + vhosts: + matterbridge-general: + host: 'libertacasa-general\.matterbridge\.dericom02\.rigel\.lysergic\.dev' + root: {{ mediapath }}libertacasa-general + matterbridge-irc: + host: 'libertacasa-irc\.matterbridge\.dericom02\.rigel\.lysergic\.dev' + root: {{ mediapath }}libertacasa-irc 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 |