From 729f88e2894d491e5a4f77e7f8b888d23f0ea380 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 17 Feb 2024 03:03:14 +0100 Subject: kodi test install on intel compute stick --- chaos-at-home/ch-mcstick.yml | 50 ++++++++++++++++++++ inventory/group_vars/chaos-at-home/network.yml | 1 + inventory/host_vars/ch-mcstick.yml | 64 ++++++++++++++++++++++++++ inventory/hosts.ini | 1 + 4 files changed, 116 insertions(+) create mode 100644 chaos-at-home/ch-mcstick.yml create mode 100644 inventory/host_vars/ch-mcstick.yml diff --git a/chaos-at-home/ch-mcstick.yml b/chaos-at-home/ch-mcstick.yml new file mode 100644 index 00000000..24a68d93 --- /dev/null +++ b/chaos-at-home/ch-mcstick.yml @@ -0,0 +1,50 @@ +--- +- 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 f4c90a7d..8634f8d6 100644 --- a/inventory/group_vars/chaos-at-home/network.yml +++ b/inventory/group_vars/chaos-at-home/network.yml @@ -16,6 +16,7 @@ network_zones: ch-octopi: 8 ch-mclr: 10 ch-mcbr: 11 + ch-mcstick: 12 ch-telesto: 20 ch-calypso: 21 ch-thetys: 22 diff --git a/inventory/host_vars/ch-mcstick.yml b/inventory/host_vars/ch-mcstick.yml new file mode 100644 index 00000000..980de731 --- /dev/null +++ b/inventory/host_vars/ch-mcstick.yml @@ -0,0 +1,64 @@ +--- +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 e0305877..027d8cb9 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -38,6 +38,7 @@ 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 -- cgit v1.2.3