Refactor matterbridge_media macro

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
This commit is contained in:
Pratyush Desai 2023-04-10 00:18:59 +05:30
parent 84c1cecf61
commit 6ebd02042f
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD

View File

@ -44,15 +44,15 @@
- proxy_set_header: Host $http_host - proxy_set_header: Host $http_host
- resolver: '{{ resolver }} ipv4=off valid=24h' - resolver: '{{ resolver }} ipv4=off valid=24h'
{%- endmacro -%} {%- endmacro -%}
{%- macro matterbridge_media(name) -%} {%- macro matterbridge_media(domain, name) -%}
- server: - server:
- include: - include:
- snippets/listen - snippets/listen
- snippets/tls_load - snippets/tls_load
- snippets/tls - snippets/tls
- server_name: {% if name == 'general' %}load.casa{%- else %}{{ name ~ '.load.casa' }}{%- endif %} - server_name: {{ domain }}
- location /: - location /:
- proxy_pass: http://libertacasa-{{ name }}.matterbridge.dericom02.rigel.lysergic.dev - proxy_pass: http://{{ name }}.matterbridge.dericom02.rigel.lysergic.dev
{%- endmacro -%} {%- endmacro -%}
nginx: nginx:
@ -316,9 +316,8 @@ nginx:
matterbridge.conf: matterbridge.conf:
config: config:
{{ matterbridge_media('general') }} {{ matterbridge_media('load.casa', 'libertacasa-general') }}
{{ matterbridge_media('irc') }} {{ matterbridge_media('irc.load.casa', 'libertacasa-irc') }}
meet.conf: meet.conf:
config: config:
- server: - server: