summaryrefslogtreecommitdiff
path: root/chaos-at-home/ch-equinox-ws.yml
blob: 9c6e6b5fedf67f3bb0c2e76782c9f23050ed57d5 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- name: Basic Setup
  hosts: ch-equinox-ws
  roles:
  - role: apt-repo/base
  - role: core/base
  - role: core/sshd/base
  - role: core/zsh
  - role: core/cpu-microcode
  - role: network/wakeonlan
  - role: apt-repo/backports
  - role: apt-repo/spreadspace
  - role: apt-repo/tor-project
  - role: apt-repo/kubic-project
  - role: apt-repo/kubernetes
  - role: apt-repo/riot
  - role: ws/base
  - role: core/admin-users
  post_tasks:
  - name: install ansible via pip
    pip:
      name: ansible>=4.4,<5.0

  - name: disable caps-lock
    lineinfile:
      path: /etc/default/keyboard
      regexp: '#?\s*XKBOPTIONS='
      line: 'XKBOPTIONS="caps:none"'

  - name: mount fileserver volumes
    mount:
      src: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus']) | ipaddr('address') }}:/"
      path: /srv/files
      fstype: nfs4
      opts: nodev,x-systemd.automount,nofail
      state: mounted

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

  - name: force pulseaudio sample rates to 48kHz (workadournd for Motu M4)
    copy:
      content: |
        resample-method = speex-float-10
        avoid-resampling = false

        default-sample-format = float32le
        default-sample-rate = 48000
        alternate-sample-rate = 48000
      dest: /etc/pulse/daemon.conf.d/motu-m4.conf

  - name: disable USB Powermanagement for Motu M4
    copy:
      content: |
        ## workaround for spurious audio issues with Motu M4
        ATTRS{idVendor}=="07fd", ATTRS{idProduct}=="0008", ATTR{power/control}="on", ATTR{power/persist}="0"
      dest: /etc/udev/rules.d/90-motu-m4-power.rules

  - name: mask virtualbox web service unit
    systemd:
      name: vboxweb.service
      masked: true
      state: stopped