--- - name: Basic Setup hosts: ch-equinox-t450s roles: - role: apt-repo/base - role: core/base - role: core/sshd/base - role: core/zsh - role: core/cpu-microcode - role: apt-repo/backports - role: apt-repo/spreadspace - role: apt-repo/tor-project - role: apt-repo/kubernetes - role: apt-repo/riot - role: apt-repo/nordvpn - role: storage/zfs/pools - role: storage/zfs/sanoid - role: ws/base - role: core/admin-users - role: network/wireguard/base - role: ws/minet post_tasks: - name: install ansible via pip pip: name: ansible - name: disable caps-lock lineinfile: path: /etc/default/keyboard regexp: '#?\s*XKBOPTIONS=' line: 'XKBOPTIONS="caps:none"' ## TODO install autostart and keyboard shortcut Ctrl+P - name: install touchpad control script copy: dest: /usr/local/bin/touchpadctl mode: 0755 content: | #!/bin/bash ID=$(xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/^.*id=\([0-9]*\).*$/\1/') if [ -z "$ID" ]; then ID=$(xinput list | grep "Synaptics TM3053-004" | sed 's/^.*id=\([0-9]*\).*$/\1/') fi if [ -z "$ID" ]; then echo "cannot find device!" exit 1 fi if [ -n "ID" ]; then case $1 in enable|disable) xinput $1 $ID ;; toggle) CURRENT_STATE=$(xinput list-props $ID | grep 'Device Enabled' | awk 'BEGIN { FS = ":" } ; { print $2 }' | sed 's/^.*\([01]\).*$/\1/') if [ $CURRENT_STATE -ne 1 ]; then xinput enable $ID else xinput disable $ID fi ;; *) echo "usage: $0 (enable|disable|toggle)" ;; esac else echo "Touchpad not found..." fi - name: force pulseaudio sample rates to 48kHz (workadournd for Motu M4) loop: - default-sample-rate - alternate-sample-rate lineinfile: path: /etc/pulse/daemon.conf regexp: ';?\s*{{ item }} = ' line: '{{ item }} = 48000' - 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: 90-mout-m4-power.rules