summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/obs/tasks/main.yml13
-rw-r--r--roles/obs/tasks/obs-setup.yml10
-rw-r--r--roles/obs/tasks/track.yml5
-rw-r--r--roles/obs/templates/bashrc3
-rwxr-xr-xroles/obs/templates/bbb5
5 files changed, 31 insertions, 5 deletions
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml
index f88cc8f..249a0bb 100644
--- a/roles/obs/tasks/main.yml
+++ b/roles/obs/tasks/main.yml
@@ -6,6 +6,15 @@
apt_repository:
repo: ppa:obsproject/obs-studio
when: ansible_distribution == "Ubuntu"
+- name: Add nodesource key
+ apt_key:
+ id: 2F59B5F99B1BE0B4
+ keyserver: keyserver.ubuntu.com
+ state: present
+- name: Add nodesource repository
+ ansible.builtin.apt_repository:
+ repo: deb https://deb.nodesource.com/node_20.x nodistro main
+ update_cache: yes
- name: Add packages
apt:
name:
@@ -19,6 +28,7 @@
- kitty
- kitty-terminfo
- alsa-utils
+ - nodejs
- dbus-x11
- obs-studio
- mumble
@@ -58,13 +68,16 @@
replace: \1 {{ emacsconf_id }}-{{ item.id }}
loop: "{{ emacsconf_tracks }}"
- name: Set system timezone
+ tags: tz
community.general.timezone:
name: "{{ emacsconf_timezone }}"
- name: Restart cron
+ tags: tz
ansible.builtin.service:
name: cron
state: restarted
- name: Set emacsconf_user timezone
+ tags: tz
lineinfile:
line: export TZ={{ emacsconf_timezone }}
dest: "/home/{{ emacsconf_user }}/.bashrc"
diff --git a/roles/obs/tasks/obs-setup.yml b/roles/obs/tasks/obs-setup.yml
index b2f8b07..5b0fba4 100644
--- a/roles/obs/tasks/obs-setup.yml
+++ b/roles/obs/tasks/obs-setup.yml
@@ -59,12 +59,18 @@
loop_control:
loop_var: filename
- name: Create OBS scripts for tracks
+ tags: obs-track-scripts
template:
- src: obs-track
- dest: "~{{ emacsconf_user }}/bin/track-obs"
+ src: "{{ script }}"
+ dest: "~{{ emacsconf_user }}/bin/{{ script }}"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
mode: 0775
+ loop_control:
+ loop_var: script
+ loop:
+ - obs-track
+ - obs-cli-track
- name: Fix permissions
become: true
become_user: root
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index 3993848..d615336 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -1,5 +1,5 @@
- name: Set vars
- tags: obs-scene, obs-profile, mpv, wip, mumble
+ tags: obs-scene, obs-profile, mpv, wip, mumble, obs-track-scripts
set_fact:
old_emacsconf_user: "{{ emacsconf_user }}"
old_emacsconf_home: "{{ emacsconf_home }}"
@@ -8,6 +8,7 @@
- debug:
var: emacsconf_home
- name: Set up user
+ tags: obs-track-scripts
include: user.yml
- name: Set up user-related things
become_user: "{{ emacsconf_user }}"
@@ -41,7 +42,7 @@
group: "{{ emacsconf_group }}"
mode: 0775
- name: Set up OBS profiles and scenes
- tags: obs-profile, obs-scene
+ tags: obs-profile, obs-scene, obs-track-scripts
include_tasks:
file: obs-setup.yml
apply:
diff --git a/roles/obs/templates/bashrc b/roles/obs/templates/bashrc
index 16a07f0..7e81001 100644
--- a/roles/obs/templates/bashrc
+++ b/roles/obs/templates/bashrc
@@ -124,3 +124,6 @@ export DISPLAY=${DISPLAY:-:{{ item.vnc_id }}}
if [ "x$DISP" != "x" ]; then
export DISPLAY={{ item.vnc_id }}
fi
+
+export OBS_PORT={{ item.obs_websocket_port }}
+export OBS_PASSWORD={{ obs_websocket_password }}
diff --git a/roles/obs/templates/bbb b/roles/obs/templates/bbb
index abe1da1..c12702c 100755
--- a/roles/obs/templates/bbb
+++ b/roles/obs/templates/bbb
@@ -10,7 +10,10 @@ fi
# Update the overlay
SLUG=$1
overlay $SLUG
+killall -s TERM firefox-esr
firefox https://media.emacsconf.org/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$SLUG.html &
-sleep 2
+sleep 5
+xdotool search --class firefox windowactivate --sync
xdotool key Return
xdotool key F11
+wait