diff --git a/roles/jitsi_jibri/defaults/main.yml b/roles/jitsi_jibri/defaults/main.yml index 9016fff..182f62e 100644 --- a/roles/jitsi_jibri/defaults/main.yml +++ b/roles/jitsi_jibri/defaults/main.yml @@ -15,7 +15,7 @@ jitsi_jibri_internal_auth_domain: internal.{{ jitsi_jibri_auth_domain }} # XMPP password to connect to jitsi_jibri_xmpp_server: "{{ jitsi_xmpp_server | default(inventory_hostname) }}" jitsi_jibri_xmpp_user: jibri -jitsi_jibri_xmpp_domain: recorder.{{ jitsi_jibri_auth_domain }} +jitsi_jibri_xmpp_domain: recorder.{{ jitsi_jibri_domain }} # A random pass will be created if not defined # jitsi_jibri_xmpp_pass: s3cr3t. jitsi_jibri_recorder_xmpp_user: recorder diff --git a/roles/jitsi_jibri/tasks/conf.yml b/roles/jitsi_jibri/tasks/conf.yml index 03a5416..08589f0 100644 --- a/roles/jitsi_jibri/tasks/conf.yml +++ b/roles/jitsi_jibri/tasks/conf.yml @@ -16,3 +16,34 @@ account required pam_permit.so dest: /etc/pam.d/xserver tags: jitsi + +- name: Allow any user to run Xorg + copy: + content: allowed_users = anybody + dest: /etc/X11/Xwrapper.config + tags: jitsi + +- name: Create Chrome policy dir + file: path=/etc/opt/chrome/policies/managed/ state=directory + tags: jitsi + +- name: Configure Chrome policy + copy: + content: | + { "CommandLineFlagSecurityWarningsEnabled": false } + dest: /etc/opt/chrome/policies/managed/managed_policies.json + tags: jitsi + +- name: Ensure snd-aloop is loaded + modprobe: name=snd-aloop state=present + tags: jitsi + +- name: Configure snd-aloop to be loaded on boot + copy: + content: snd-aloop + dest: /etc/modules-load/jibri.conf + tags: jitsi + +- name: Configure asound + template: asound.conf.j2 dest={{ jitsi_root_dir }}/jibri/.asoundrc owner={{ jitsi_jibri_user }} + tags: jitsi diff --git a/roles/jitsi_jibri/tasks/install.yml b/roles/jitsi_jibri/tasks/install.yml index ae7ac76..a87cad4 100644 --- a/roles/jitsi_jibri/tasks/install.yml +++ b/roles/jitsi_jibri/tasks/install.yml @@ -11,7 +11,7 @@ - alsa-utils - icewm - xdotool - - xorg-x11-drv-void + #- xorg-x11-drv-void - xorg-x11-drv-dummy tags: jitsi @@ -40,7 +40,7 @@ - name: Move ChromeDriver bin copy: - src: "{{ jitsi_root_dir }}/tmp/chromedirver" + src: "{{ jitsi_root_dir }}/tmp/chromedriver" dest: /usr/local/bin/chromedriver mode: 755 remote_src: True diff --git a/roles/jitsi_jibri/tasks/user.yml b/roles/jitsi_jibri/tasks/user.yml index 7244256..1d72d1b 100644 --- a/roles/jitsi_jibri/tasks/user.yml +++ b/roles/jitsi_jibri/tasks/user.yml @@ -7,4 +7,5 @@ groups: - tty - video + - audio tags: jitsi diff --git a/roles/jitsi_jibri/templates/asound.conf.j2 b/roles/jitsi_jibri/templates/asound.conf.j2 new file mode 100644 index 0000000..b58a441 --- /dev/null +++ b/roles/jitsi_jibri/templates/asound.conf.j2 @@ -0,0 +1,46 @@ +pcm.amix { + type dmix + ipc_key 219345 + slave.pcm "hw:Loopback,0,0" +} + +pcm.asnoop { + type dsnoop + ipc_key 219346 + slave.pcm "hw:Loopback_1,1,0" +} + +pcm.aduplex { + type asym + playback.pcm "amix" + capture.pcm "asnoop" +} + +pcm.bmix { + type dmix + ipc_key 219347 + slave.pcm "hw:Loopback_1,0,0" +} + +pcm.bsnoop { + type dsnoop + ipc_key 219348 + slave.pcm "hw:Loopback,1,0" +} + +pcm.bduplex { + type asym + playback.pcm "bmix" + capture.pcm "bsnoop" +} + +pcm.pjsua { + type plug + slave.pcm "bduplex" +} + +pcm.!default { + type plug + slave.pcm "aduplex" +} +