From ea313c8c9961e01f571a466c553acb2257012b66 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 20 Jul 2023 22:00:42 +0200 Subject: add test host for rpi-zero2 w --- inventory/group_vars/chaos-at-home/network.yml | 1 + inventory/host_vars/ch-rpizero2w-test.yml | 24 ++++++++++++++++++++++++ inventory/hosts.ini | 2 ++ roles/raspios/image/templates/firstrun.sh.j2 | 1 + 4 files changed, 28 insertions(+) create mode 100644 inventory/host_vars/ch-rpizero2w-test.yml diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml index 0650953a..655a7088 100644 --- a/inventory/group_vars/chaos-at-home/network.yml +++ b/inventory/group_vars/chaos-at-home/network.yml @@ -33,6 +33,7 @@ network_zones: ch-rpi4-test: 35 ch-rpi3-test: 36 ch-rpizerow-test: 37 + ch-rpizero2w-test: 38 ele-media: 99 ch-prometheus: 200 ch-epimetheus: 201 diff --git a/inventory/host_vars/ch-rpizero2w-test.yml b/inventory/host_vars/ch-rpizero2w-test.yml new file mode 100644 index 00000000..bb6b2289 --- /dev/null +++ b/inventory/host_vars/ch-rpizero2w-test.yml @@ -0,0 +1,24 @@ +--- +raspios_variant: lite +raspios_arch: arm64 + +network: + nameservers: "{{ network_zones.lan.dns }}" + domain: "{{ host_domain }}" + primary: &_network_primary_ + name: wlan0 + address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}" + gateway: "{{ network_zones.lan.gateway }}" + wifi: + ssid: "{{ network_zones.lan.wifi.ssid }}" + key: "{{ network_zones.lan.wifi.key }}" + interfaces: + - *_network_primary_ + +raspios_boot_config: + - regexp: '^#?dtparam=audio=' + line: 'dtparam=audio=off' + - regexp: '^#?dtoverlay=disable-bt' + line: 'dtoverlay=disable-bt' + +base_entropy_generator: rngd diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 809acceb..fb5f883d 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -65,6 +65,7 @@ ch-cm4-test ch-rpi4-test ch-rpi3-test ch-rpizerow-test +ch-rpizero2w-test [chaos-at-home:children] mz-chaos-at-home @@ -344,6 +345,7 @@ ch-cm4-test ch-rpi4-test ch-rpi3-test ch-rpizerow-test +ch-rpizero2w-test ch-mclr ch-octopi ch-epimetheus diff --git a/roles/raspios/image/templates/firstrun.sh.j2 b/roles/raspios/image/templates/firstrun.sh.j2 index 65181683..2ff0fd59 100644 --- a/roles/raspios/image/templates/firstrun.sh.j2 +++ b/roles/raspios/image/templates/firstrun.sh.j2 @@ -33,6 +33,7 @@ raspi-config nonint do_ssh 0 systemctl disable hciuart.service {% if 'wifi' in network.primary %} raspi-config nonint do_wifi_ssid_passphrase "{{ network.primary.wifi.ssid }}" "{{ network.primary.wifi.key }}" +raspi-config nonint do_wifi_country "AT" {% else %} systemctl disable wpa_supplicant.service {% endif %} -- cgit v1.2.3