From 2be81b299be9cad0b03495f2ea038a01969c6cb2 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Tue, 1 Oct 2024 19:59:03 -0400 Subject: Update for new ansible version --- roles/stream/templates/emacsconf.nginx.conf | 9 ++++++++- roles/stream/templates/icecast.xml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'roles/stream/templates') diff --git a/roles/stream/templates/emacsconf.nginx.conf b/roles/stream/templates/emacsconf.nginx.conf index ac84ef5..cf5e2b8 100644 --- a/roles/stream/templates/emacsconf.nginx.conf +++ b/roles/stream/templates/emacsconf.nginx.conf @@ -11,6 +11,10 @@ location ~ ^/((gen|dev)(-480p|-fallback)?.webm)$ { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Real-IP $remote_addr; + {% if protect_stream_with_password %} + auth_basic {{ emacsconf_name }}; + auth_basic_user_file /etc/nginx/{{ emacsconf_id }}-htpasswd; + {% endif %} } location ~ ^/emacsconf/(.*)$ { @@ -26,5 +30,8 @@ location ~ ^/emacsconf/(.*)$ { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Real-IP $remote_addr; + {% if protect_stream_with_password %} + auth_basic {{ emacsconf_name }}; + auth_basic_user_file /etc/nginx/{{ emacsconf_id }}-htpasswd; + {% endif %} } - \ No newline at end of file diff --git a/roles/stream/templates/icecast.xml b/roles/stream/templates/icecast.xml index 06830d3..b01bc48 100644 --- a/roles/stream/templates/icecast.xml +++ b/roles/stream/templates/icecast.xml @@ -192,7 +192,6 @@ /{{ track.id }}.webm {{ icecast_emacsconf_user }} {{ icecast_emacsconf_password }} - {% if not test_mode %}/data/{{ emacsconf_id }}-{{ emacsconf_year }}-{{ track.id }}_%Y-%m-%d_%H-%M-%S.webm{% endif %} {{ emacsconf_name }} {{ emacsconf_year }} - {{ track.name }} track The livestream for the {{ track.name }} track of {{ emacsconf_name }} {{ emacsconf_year }} {{ track.watch }} @@ -202,6 +201,7 @@ /usr/local/bin/{{ emacsconf_id }}-lowres-{{ track.id }}-on-disconnect /{{ track.id }}-sorry.webm 1 + {% if not test_mode %}/data/{{ emacsconf_id }}-{{ emacsconf_year }}-{{ track.id }}_%Y-%m-%d_%H-%M-%S.webm{% endif %} /{{ track.id }}-host.webm -- cgit v1.2.3