summaryrefslogtreecommitdiffstats
path: root/roles/media
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/media/tasks/main.yml49
-rw-r--r--roles/media/templates/nginx-include19
-rw-r--r--roles/media/templates/nginx-site-config7
3 files changed, 72 insertions, 3 deletions
diff --git a/roles/media/tasks/main.yml b/roles/media/tasks/main.yml
index 8cd854d..e9daaef 100644
--- a/roles/media/tasks/main.yml
+++ b/roles/media/tasks/main.yml
@@ -11,6 +11,10 @@
file:
path: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/backstage
state: directory
+- name: Ensure current directory exists
+ file:
+ path: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/current
+ state: directory
- name: Create group
group:
name: "{{ emacsconf_group }}"
@@ -68,3 +72,48 @@
service:
name: nginx
state: reloaded
+- name: Symlink the current year's backstage directory
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}/backstage
+ dest: "~{{ emacsconf_user }}/backstage"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Symlink the current year's directory
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}
+ dest: "~{{ emacsconf_user }}/{{ emacsconf_year }}"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Symlink the current year's directory as current
+ file:
+ src: /var/www/{{ media_server_name }}/{{ emacsconf_year }}
+ dest: "~{{ emacsconf_user }}/current"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+- name: Create the bin directory
+ tags: media-scripts
+ file:
+ state: directory
+ path: "~{{ emacsconf_user }}/bin"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+- name: Add the bin directory to the path
+ tags: media-scripts
+ lineinfile:
+ dest: "~{{ emacsconf_user }}/.bashrc"
+ state: present
+ line: "export PATH=$PATH:~/bin"
+- name: Create batch scripts
+ tags: media-scripts
+ template:
+ src: "{{ item }}"
+ dest: "~{{ emacsconf_user }}/bin/{{ item }}"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ mode: 0755
+ loop:
+ - bbb-open
+ - bbb-before
diff --git a/roles/media/templates/nginx-include b/roles/media/templates/nginx-include
index f80ed76..4d1eabe 100644
--- a/roles/media/templates/nginx-include
+++ b/roles/media/templates/nginx-include
@@ -12,15 +12,30 @@ location /{{ emacsconf_year }}/backstage {
expires off;
etag off;
}
+ location ~* \.vtt$ {
+ add_header Cache-Control "no-cache, no-store, must-revalidate";
+ add_header Pragma "no-cache";
+ add_header Expires "0";
+ }
+
location /{{ emacsconf_year }}/{{ emacsconf_id }}.ics {
- auth_basic off;
- }
+ auth_basic off;
+ add_header Cache-Control "no-cache, no-store, must-revalidate";
+ add_header Pragma "no-cache";
+ add_header Expires "0";
+}
location /{{ emacsconf_year }}/schedules/ {
auth_basic off;
+ add_header Cache-Control "no-cache, no-store, must-revalidate";
+ add_header Pragma "no-cache";
+ add_header Expires "0";
}
{% for track in emacsconf_tracks %}
location /{{ emacsconf_year }}/{{ emacsconf_id }}-{{ track.id }}.ics {
auth_basic off;
+ add_header Cache-Control "no-cache, no-store, must-revalidate";
+ add_header Pragma "no-cache";
+ add_header Expires "0";
}
{% endfor %}
{% if media_protect_root %}
diff --git a/roles/media/templates/nginx-site-config b/roles/media/templates/nginx-site-config
index 4dbdaaa..ba25cba 100644
--- a/roles/media/templates/nginx-site-config
+++ b/roles/media/templates/nginx-site-config
@@ -2,4 +2,9 @@ server {
listen 80;
server_name {{ media_server_name }};
root /var/www/{{ media_server_name }};
-} \ No newline at end of file
+ location ~* \.vtt$ {
+ add_header Cache-Control "no-cache, no-store, must-revalidate";
+ add_header Pragma "no-cache";
+ add_header Expires "0";
+ }
+}