summaryrefslogtreecommitdiff
path: root/chaos-at-home/ch-hdmistick.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-04-10 02:08:10 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-04-10 02:08:10 +0200
commitd35a5a0c46aa206c6762b144a121b588bc572194 (patch)
treeeeeb7005f63df192bdea114e3a040599d3c0bccf /chaos-at-home/ch-hdmistick.yml
parentstreaming/mpv-headless: start mpv with --idle and use json IPC to control it ... (diff)
ch-mcstick -> ch-hdmistick: new use as mpv-headless player
Diffstat (limited to 'chaos-at-home/ch-hdmistick.yml')
-rw-r--r--chaos-at-home/ch-hdmistick.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/chaos-at-home/ch-hdmistick.yml b/chaos-at-home/ch-hdmistick.yml
new file mode 100644
index 00000000..b98e60ff
--- /dev/null
+++ b/chaos-at-home/ch-hdmistick.yml
@@ -0,0 +1,49 @@
+---
+- name: Basic Setup
+ hosts: ch-hdmistick
+ roles:
+ - role: apt-repo/base
+ - role: core/base
+ - role: core/sshd/base
+ - role: core/zsh
+ - role: core/ntp
+
+- name: Payload Setup
+ hosts: ch-hdmistick
+ roles:
+ - role: streaming/mpv-headless
+ post_tasks:
+ - name: install wifi stuff
+ apt:
+ name:
+ - wireless-tools
+ - wpasupplicant
+ - firmware-realtek
+ state: present
+
+ - name: generate wireless interface config
+ copy:
+ content: |
+ # ansible generated
+ auto wlan0
+ iface wlan0 inet static
+ up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
+ up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
+ address {{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}
+ netmask {{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) | ansible.utils.ipaddr('netmask') }}
+ gateway {{ network_zones.lan.gateway }}
+ dns-nameservers {{ network_zones.lan.dns | join(' ') }}
+ dns-search {{ host_domain }}
+ wpa-ssid "{{ network_zones.lan.wifi.ssid }}"
+ wpa-psk "{{ network_zones.lan.wifi.key }}"
+ dest: /etc/network/interfaces.d/wifi
+ mode: 0600
+
+ - name: remove temporary USB-eth interface config
+ loop:
+ - '^auto {{ network.primary.name }}'
+ - '^iface {{ network.primary.name }}'
+ lineinfile:
+ path: "/etc/network/interfaces"
+ regexp: "{{ item }}"
+ state: absent