From c74f79f1927c10448649369f00bd5ff3c6090d82 Mon Sep 17 00:00:00 2001 From: Wouter Verhelst Date: Tue, 18 Feb 2020 17:49:08 +0200 Subject: [PATCH] Install the email templates (and also create the other directories while at it) --- .../roles/encoder-storage/tasks/main.yml | 26 +++++++++ .../templates/announce-email.ep.j2 | 27 +++++++++ .../templates/notify-email.ep.j2 | 58 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 ansible/playbooks/roles/encoder-storage/templates/announce-email.ep.j2 create mode 100644 ansible/playbooks/roles/encoder-storage/templates/notify-email.ep.j2 diff --git a/ansible/playbooks/roles/encoder-storage/tasks/main.yml b/ansible/playbooks/roles/encoder-storage/tasks/main.yml index 22ec5645..faf70cc0 100644 --- a/ansible/playbooks/roles/encoder-storage/tasks/main.yml +++ b/ansible/playbooks/roles/encoder-storage/tasks/main.yml @@ -19,3 +19,29 @@ name: nfs-server state: restarted when: reviewstorage_nfs_exported.changed + +- name: "create assets directory" + file: + path: /srv/sreview/assets + state: directory + +- name: "create other directories" + file: + path: /srv/sreview/{{ item }} + state: directory + owner: 2000 + group: 2000 + with_items: + - storage + - output + +- name: "Create email templates" + template: + dest: /srv/sreview/assets/{{ item }} + src: "{{ item }}" + owner: root + group: root + mode: 0644 + with_items: + - announce_email.ep.j2 + - notify_email.ep.j2 diff --git a/ansible/playbooks/roles/encoder-storage/templates/announce-email.ep.j2 b/ansible/playbooks/roles/encoder-storage/templates/announce-email.ep.j2 new file mode 100644 index 00000000..732f941b --- /dev/null +++ b/ansible/playbooks/roles/encoder-storage/templates/announce-email.ep.j2 @@ -0,0 +1,27 @@ +Hi! + +This is to inform you that your talk at {{ event.fullname }}, with title + +<%== $title %> + +has been fully transcoded and uploaded to + +% my $room = $talk->room; +% $room =~ s/ \(.*//; +https://video.fosdem.org/{{ event.year }}/<%== $room . '/' . $talk->slug . ".mp4" %> +https://video.fosdem.org/{{ event.year }}/<%== $room . '/' . $talk->slug . ".webm" %> + +Please note however, that it will still take a while for our mirrors to +pick up the video; before that happens, you will not be able to watch +it. Mirror sync may take up to a couple of hours in the worst case. + +Additionally, your video will also be linked to from the schedule; +however, this too may take a while. + +Should you encounter any issues with your recording, you may contact us +via: + +email: video@fosdem.org +IRC: irc.freenode.net, #fosdem-video + +Thanks for your assistance, diff --git a/ansible/playbooks/roles/encoder-storage/templates/notify-email.ep.j2 b/ansible/playbooks/roles/encoder-storage/templates/notify-email.ep.j2 new file mode 100644 index 00000000..e0c72b52 --- /dev/null +++ b/ansible/playbooks/roles/encoder-storage/templates/notify-email.ep.j2 @@ -0,0 +1,58 @@ +Hi! + +This is to inform you that your talk at {{ event.fullname }}, with title + +<%== $title %> + +is now available for you to review. + +Please help us reviewing this talk, so that we can release it sooner. If +you don't do so, we will eventually get around to it ourselves, but that +might take a while. +% my $corrections = $talk->corrections; +% if (exists ($corrections->{serial})) { + +We note that this is not the first time you receive this email; this is +because the video has been reviewed a first time (possibly not by you -- +check the Cc list, above). For your information, the following +corrections were applied to this video: + +Review counter: <%== $corrections->{serial} %> +Start time offset: <%== $corrections->{offset_start} %> +Length adjust: <%== $corrections->{length_adj} %> +A/V sync correction: <%== $corrections->{offset_audio} %> +Audio channel selection: Channel <%== $corrections->{audio_channel} %> +% if (defined($talk->apology)) { + +Additionally, this talk has an apology note configured: + + "<%== $talk->apology %>" + +If the talk is released, the above note will be shown on a "We're sorry, +but we had some technical problems"-type interstitial slide between the +opening credits and the actual talk. + +Should you wish to see it changed, please contact the FOSDEM video team +(see below). +% } + +Don't worry if you don't understand what the above means. The review +system will have taken your input, and created a new preview video. +Please review it, and confirm it if all is well. +% } else { +We note that this talk may have been previously submitted without any +changes been made to it. This is unlikely to have worked very well, so +we reset the talk to the editing stage. +% } + +Should you encounter any issues with your recording, you may contact us +via: + +email: video@fosdem.org +IRC: irc.freenode.net, #fosdem-video + +To review, please go to the following URL: + +<%== $url %> + +Thanks for your assistance!