From 077112b718eb29aecf331b1e703e7e90d8538e6c Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 13 Sep 2023 08:58:06 -0400 Subject: add some more scripts, change 2022 to emacsconf_year --- roles/base/vars/main.yml | 50 +++++- roles/caption/tasks/main.yml | 18 +-- roles/caption/templates/process-captions.py | 4 +- roles/media/defaults/main.yml | 2 +- roles/media/tasks/main.yml | 3 - roles/media/templates/nginx-include | 11 +- roles/obs/overlay.svg | 223 +------------------------- roles/obs/tasks/main.yml | 1 + roles/obs/templates/bbb | 3 +- roles/obs/templates/intro | 8 +- roles/obs/templates/mpv-track | 2 +- roles/obs/templates/mpv.conf | 2 +- roles/obs/templates/pad | 8 + roles/obs/templates/play | 2 +- roles/obs/templates/play-with-intro | 2 +- roles/obs/templates/set-overlay | 2 +- roles/obs/templates/vnc-track | 2 +- roles/pad-proxy/templates/etherpad.nginx.conf | 4 +- roles/pad/defaults/main.yml | 2 +- roles/pad/templates/settings.json | 2 +- roles/prerec/templates/process-prerec.sh | 6 +- roles/prerec/templates/run-aeneas.sh | 4 +- roles/publish/tasks/main.yml | 4 +- roles/publish/templates/emacsconf-config.el | 2 +- roles/upload/defaults/main.yml | 1 + roles/wiki/templates/emacsconf.setup | 2 +- 26 files changed, 112 insertions(+), 258 deletions(-) create mode 100755 roles/obs/templates/pad (limited to 'roles') diff --git a/roles/base/vars/main.yml b/roles/base/vars/main.yml index 927d641..2a01fbf 100644 --- a/roles/base/vars/main.yml +++ b/roles/base/vars/main.yml @@ -42,7 +42,55 @@ init_users: state: present shell: /bin/bash create_home: true - + jman: + name: jman + group: jman + groups: org-admin + state: present + shell: /bin/bash + create_home: true + corwin: + name: corwin + group: corwin + groups: org-admin + state: present + shell: /bin/bash + create_home: true + orga: + name: orga + group: orga + groups: org-admin + state: present + shell: /bin/bash + create_home: true + bremner: + name: bremner + group: bremner + groups: org-admin + state: present + shell: /bin/bash + create_home: true + dto: + name: bremner + group: bremner + groups: org-admin + state: present + shell: /bin/bash + create_home: true + vk: + name: bremner + group: bremner + groups: org-admin + state: present + shell: /bin/bash + create_home: true + bhavin192: + name: bhavin192 + group: bhavin192 + groups: org-admin + state: present + shell: /bin/bash + create_home: true sudoers_files: - sudoers.d/10_ansible - sudoers.d/20_org_admin diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml index df35645..b34a67d 100644 --- a/roles/caption/tasks/main.yml +++ b/roles/caption/tasks/main.yml @@ -46,15 +46,15 @@ src: talks.json dest: "{{ emacsconf_caption_dir }}/talks.json" mode: 0664 -- name: Install init.d configuration - tags: system - become: true - template: - src: captions.init.d - dest: /etc/init.d/captions - owner: root - group: root - mode: 0755 +# - name: Install init.d configuration +# tags: system +# become: true +# template: +# src: captions.init.d +# dest: /etc/init.d/captions +# owner: root +# group: root +# mode: 0755 - name: Change the group for all the files file: dest: "{{ emacsconf_caption_dir }}" diff --git a/roles/caption/templates/process-captions.py b/roles/caption/templates/process-captions.py index 9b345fe..dc7ef29 100755 --- a/roles/caption/templates/process-captions.py +++ b/roles/caption/templates/process-captions.py @@ -114,7 +114,7 @@ def extract_audio(work): log("Extracting audio from %s acodec %s" % (work['video'], acodec)) output = subprocess.check_output(['ffmpeg', '-y', '-i', work['video'], '-acodec', acodec, '-vn', new_file], stderr=subprocess.STDOUT) work['audio'] = new_file - subprocess.call(["/data/emacsconf/2022/scripts/upload.sh", work['audio']]) + subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['audio']]) return work def to_sec(time_str): @@ -149,7 +149,7 @@ def generate_captions(work): whisper.utils.write_txt(result['segments'], file=txt) work['vtt'] = new_file work['txt'] = work['base'] + '.txt' - subprocess.call(["/data/emacsconf/2022/scripts/upload.sh", work['vtt'], work['txt']]) + subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']]) if 'srv2' in work: del work['srv2'] return work 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 { diff --git a/roles/obs/overlay.svg b/roles/obs/overlay.svg index b3314f6..09f6c83 100644 --- a/roles/obs/overlay.svg +++ b/roles/obs/overlay.svg @@ -5,7 +5,7 @@ viewBox="0 0 338.66667 190.5" version="1.1" id="svg2360" - inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" sodipodi:docname="overlay.svg" xml:space="preserve" inkscape:export-filename="video.svg" @@ -28,13 +28,13 @@ inkscape:pageshadow="2" inkscape:zoom="0.62998576" inkscape:cx="129.368" - inkscape:cy="373.81797" + inkscape:cy="391.27869" inkscape:document-units="in" inkscape:current-layer="layer1" inkscape:document-rotation="0" showgrid="false" units="in" - inkscape:window-width="699" + inkscape:window-width="824" inkscape:window-height="709" inkscape:window-x="667" inkscape:window-y="0" @@ -48,220 +48,13 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">