From f748ff206801304b39b8e3222c5abf9551918713 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Mon, 28 Nov 2022 19:57:52 -0500 Subject: fallback for stream --- roles/stream/tasks/main.yml | 26 ++++++++++++++++++++++++-- roles/stream/tasks/track.yml | 22 ++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) (limited to 'roles/stream/tasks') diff --git a/roles/stream/tasks/main.yml b/roles/stream/tasks/main.yml index 9c35f69..6a53df1 100644 --- a/roles/stream/tasks/main.yml +++ b/roles/stream/tasks/main.yml @@ -63,7 +63,7 @@ tags: restream template: src: restream.sh - dest: /home/orga/restream-{{ item[1].name }}-{{ item[0].name }}.sh + dest: /usr/local/bin/restream-{{ item[1].name }}-{{ item[0].name }} owner: orga mode: 0755 loop: "{{ restreaming_platforms | subelements('streams') | list }}" @@ -72,8 +72,30 @@ tags: restream template: src: screen-restream.sh - dest: /home/orga/screen-restream-{{ item[1].name }}-{{ item[0].name }}.sh + dest: /usr/local/bin/screen-restream-{{ item[1].name }}-{{ item[0].name }}.sh owner: orga mode: 0755 loop: "{{ restreaming_platforms | subelements('streams') | list }}" no_log: True +- name: Copy fallback files + copy: + src: sorry.webm + dest: /usr/share/icecast2/web/fallback.webm + mode: 0644 + owner: "{{ icecast_user }}" + group: "{{ icecast_group }}" +- name: Copy 480p fallback files + copy: + src: sorry-480p.webm + dest: /usr/share/icecast2/web/480p-fallback.webm + mode: 0644 + owner: "{{ icecast_user }}" + group: "{{ icecast_group }}" +- name: Make a script to kick off all the fallbacks + template: + src: screen-fallbacks + dest: /usr/local/bin/screen-fallbacks + mode: 0755 + owner: "{{ icecast_user }}" + group: "{{ icecast_group }}" + diff --git a/roles/stream/tasks/track.yml b/roles/stream/tasks/track.yml index d1e8204..3afb712 100644 --- a/roles/stream/tasks/track.yml +++ b/roles/stream/tasks/track.yml @@ -13,5 +13,23 @@ src: on-disconnect dest: /usr/local/bin/{{ emacsconf_id }}-lowres-{{ item.id }}-on-disconnect mode: 0755 - - +- name: Copy fallback script + template: + src: screen-fallback.sh + dest: /usr/local/bin/screen-fallback-{{ item.id }} + mode: 0755 + owner: "{{ icecast_user }}" + group: "{{ icecast_group }}" + vars: + filename: fallback.webm + mount: "{{ item.id }}-sorry.webm" +- name: Copy 480p fallback script + template: + src: screen-fallback.sh + dest: /usr/local/bin/screen-fallback-{{ item.id }}-480p + mode: 0755 + owner: "{{ icecast_user }}" + group: "{{ icecast_group }}" + vars: + filename: 480p-fallback.webm + mount: "{{ item.id }}-480p-sorry.webm" -- cgit v1.2.3