From d35a5a0c46aa206c6762b144a121b588bc572194 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 10 Apr 2024 02:08:10 +0200 Subject: ch-mcstick -> ch-hdmistick: new use as mpv-headless player --- chaos-at-home/ch-hdmistick.yml | 49 ++++++++++++++++++++ chaos-at-home/ch-mcstick.yml | 50 -------------------- inventory/group_vars/chaos-at-home/network.yml | 2 +- inventory/host_vars/ch-hdmistick.yml | 51 ++++++++++++++++++++ inventory/host_vars/ch-mcstick.yml | 64 -------------------------- inventory/hosts.ini | 2 +- 6 files changed, 102 insertions(+), 116 deletions(-) create mode 100644 chaos-at-home/ch-hdmistick.yml delete mode 100644 chaos-at-home/ch-mcstick.yml create mode 100644 inventory/host_vars/ch-hdmistick.yml delete mode 100644 inventory/host_vars/ch-mcstick.yml 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 diff --git a/chaos-at-home/ch-mcstick.yml b/chaos-at-home/ch-mcstick.yml deleted file mode 100644 index 24a68d93..00000000 --- a/chaos-at-home/ch-mcstick.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -- name: Basic Setup - hosts: ch-mcstick - roles: - - role: apt-repo/base - - role: core/base - - role: core/sshd/base - - role: core/zsh - - role: core/ntp - -- name: Payload Setup - hosts: ch-mcstick - roles: - - role: kodi/standalone - - role: kodi/config - 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 diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml index 16c61dc6..0c85864b 100644 --- a/inventory/group_vars/chaos-at-home/network.yml +++ b/inventory/group_vars/chaos-at-home/network.yml @@ -16,7 +16,6 @@ network_zones: ch-octopi: 8 ch-mclr: 10 ch-mcbr: 11 - ch-mcstick: 12 ch-telesto: 20 ch-calypso: 21 ch-thetys: 22 @@ -38,6 +37,7 @@ network_zones: ch-apu-openwrt: 39 ch-zimablade: 40 ch-companion-raspi: 41 + ch-hdmistick: 42 ele-media: 99 ch-prometheus: 200 ch-epimetheus: 201 diff --git a/inventory/host_vars/ch-hdmistick.yml b/inventory/host_vars/ch-hdmistick.yml new file mode 100644 index 00000000..cac59696 --- /dev/null +++ b/inventory/host_vars/ch-hdmistick.yml @@ -0,0 +1,51 @@ +--- +install: + efi: yes + disks: + primary: /dev/disk/by-id/mmc-S10008_0x3a8a047e + system_lvm: + volumes: + - name: root + size: 4G + filesystem: ext4 + mountpoint: / + - name: var+log + size: 768M + filesystem: ext4 + mountpoint: /var/log + mount_options: + - noatime + - nodev + - noexec + +install_dhcp: yes +network: + domain: "{{ host_domain }}" + primary: + name: enx00e04d6a076e + + +base_modules_blacklist: "{{ base_modules_blacklist_all_but_sound }}" + +sshd_allowusers_host: + - player + + +apt_repo_components: + - main + - contrib + - non-free-firmware + - non-free + + +mpv_headless_media_storage: + type: lvm + vg: "{{ host_name }}" + lv: media + size: 1G + fs: ext4 + +mpv_headless_audio_device: "alsa/hdmi" +mpv_headless_video_mode: "1920x1080@50" + +mpv_headless_ssh_keys: "{{ users.equinox.ssh }}" diff --git a/inventory/host_vars/ch-mcstick.yml b/inventory/host_vars/ch-mcstick.yml deleted file mode 100644 index 980de731..00000000 --- a/inventory/host_vars/ch-mcstick.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -install: - efi: yes - disks: - primary: /dev/disk/by-id/mmc-S10008_0x3a8a047e - system_lvm: - volumes: - - name: root - size: 5G - filesystem: ext4 - mountpoint: / - - name: var+log - size: 768M - filesystem: ext4 - mountpoint: /var/log - mount_options: - - noatime - - nodev - - noexec - -install_dhcp: yes -network: - domain: "{{ host_domain }}" - primary: - name: enx00e04d6a076e - - -base_modules_blacklist: "{{ base_modules_blacklist_none }}" - -apt_repo_components: - - main - - contrib - - non-free-firmware - - non-free - -ntp_variant: systemd-timesyncd - - -kodi_standalone_kodi_packages_extra: - - kodi-repository-kodi - - kodi-inputstream-adaptive - - kodi-inputstream-rtmp - -kodi_config_nfs4_mounts: - - src: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets['ch-prometheus']) | ansible.utils.ipaddr('address') }}:/" - path: /srv/files - -kodi_config_guisettings: - locale.keyboardlayouts: "German ABC|German QWERTZ" - locale.activekeyboardlayout: "German QWERTZ" - locale.country: Central Europe - locale.timezonecountry: Austria - locale.timezone: Europe/Vienna - services.devicename: "chaos at media (stick)" - services.webserver: "true" - services.webserverauthentication: "false" - services.esallinterfaces: "true" - -kodi_config_sources: - video: - - name: Series - path: /srv/files/series - - name: Movies - path: /srv/files/movies diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 958a36c3..4b63a684 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -38,7 +38,6 @@ ch-greenbone host_name=greenbone ch-epimetheus host_name=epimetheus ch-mclr host_name=mclr ch-mcbr host_name=mcbr -ch-mcstick host_name=mcstick ch-octopi host_name=octopi ch-atlas host_name=atlas ch-pan-legacy host_name=pan @@ -70,6 +69,7 @@ ch-rpizerow-test ch-rpizero2w-test ch-zimablade ch-companion-raspi +ch-hdmistick host_name=hdmistick [chaos-at-home:children] mz-chaos-at-home -- cgit v1.2.3