summaryrefslogtreecommitdiff
path: root/dan/ele-hpws-mini1.yml
blob: 657ff5d89fa11a267692b0d8f841303496789d22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- name: Basic Setup
  hosts: ele-hpws-mini1
  roles:
  - role: apt-repo/base
  - role: core/base
  - role: core/sshd/base
  - role: core/zsh
  - role: core/ntp
  - role: core/cpu-microcode

- name: Payload Setup
  hosts: ele-hpws-mini1
  roles:
  - role: apt-repo/obs-studio
  - role: apt-repo/spreadspace
  - role: ws/base
  - role: core/admin-users
  post_tasks:
  - name: install chromium start script
    copy:
      content: |
        #!/bin/sh

        SITE=$1
        if [ -z "$SITE"]; then
          SITE="https://remote.elev8.at/stream-ui/player.html#control={{ hostvars['ele-jitsi'].jitsi_meet_streamui.default_control_room }}&displayName={{ host_name }}"
        fi
        DISPLAY=:0 chromium "$SITE" --window-position=1920,0  --disable-infobars --use-fake-ui-for-media-stream --kiosk --temp-profile --start-maximized --enabled --enable-logging --autoplay-policy=no-user-gesture-required
      dest: /usr/local/bin/jitsi-display.sh
      mode: 0755

  - name: install mpv play script
    copy:
      content: |
        #!/bin/sh
        exec mpv --geometry=1920x1080+1920+0 -fs --osd-level=0 "$@"
      dest: /usr/local/bin/play-video.sh
      mode: 0755

  - name: create pulse daemon config directory
    file:
      path: /etc/pulse/daemon.conf.d
      state: directory

  - name: force pulseaudio sample rates to 48kHz
    copy:
      content: |
        avoid-resampling = false
        default-sample-rate = 48000
        alternate-sample-rate = 48000
      dest: /etc/pulse/daemon.conf.d/force-48k.conf