diff options
author | Sacha Chua <sacha@sachachua.com> | 2023-09-13 08:58:06 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2023-09-13 08:58:24 -0400 |
commit | 077112b718eb29aecf331b1e703e7e90d8538e6c (patch) | |
tree | 5eab58517501dce8c79101bb7740c5000c506511 /roles/media | |
parent | 366d6aec267f543f9a7b928778a09b80852346f3 (diff) | |
download | emacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.tar.xz emacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.zip |
add some more scripts, change 2022 to emacsconf_year
Diffstat (limited to '')
-rw-r--r-- | roles/media/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/media/tasks/main.yml | 3 | ||||
-rw-r--r-- | roles/media/templates/nginx-include | 11 |
3 files changed, 9 insertions, 7 deletions
diff --git a/roles/media/defaults/main.yml b/roles/media/defaults/main.yml index 3cdf81c..2ecd784 100644 --- a/roles/media/defaults/main.yml +++ b/roles/media/defaults/main.yml @@ -1,2 +1,2 @@ -media_protect_root: false media_server_name: media.emacsconf.org + diff --git a/roles/media/tasks/main.yml b/roles/media/tasks/main.yml index f49bcd2..6eb3ab6 100644 --- a/roles/media/tasks/main.yml +++ b/roles/media/tasks/main.yml @@ -1,6 +1,3 @@ -- name: Set media_protect_root - set_fact: - media_protect_root: not test_mode - name: Install package for setting htpasswd package: name: python3-passlib diff --git a/roles/media/templates/nginx-include b/roles/media/templates/nginx-include index 922bebb..03a7bfa 100644 --- a/roles/media/templates/nginx-include +++ b/roles/media/templates/nginx-include @@ -8,11 +8,16 @@ rewrite ^/{{ emacsconf_year }}/backstage/current/room/([^/]*)$ https://{{ media_ rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/pad/?$ https://{{ etherpad_server_name }}/{{ emacsconf_year }}-$1 redirect; rewrite ^/{{ emacsconf_year }}/backstage/current/([^/]*)/room/?$ https://{{ media_server_name }}/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$1.html redirect; } - {% if media_protect_root %} + {% if media_protect_root|bool %} location /{{ emacsconf_year }} { - auth_basic "Restricted"; - auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd; + # TODO: Figure out how to make this properly controlled by the variable + # auth_basic "Restricted"; + # auth_basic_user_file /etc/nginx/sites-available/{{ host_name }}-{{ emacsconf_year }}-htpasswd; autoindex on; + } + {% else %} + location /{{ emacsconf_year }} { + autoindex on; } {% endif %} location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics { |