summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-05-08 01:12:50 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-05-08 01:14:21 +0200
commit8cf2345b74e793100ec7126a1e98a68f5f14fdbf (patch)
tree83463c978741872e782c1e864611583db0448c7d
parentch-cm4-test: add example config for Cytron CM4 Maker Board (diff)
add raspi5 test host and fix raspios image network config
-rw-r--r--inventory/group_vars/chaos-at-home/network.yml1
-rw-r--r--inventory/host_vars/ch-rpi5-test.yml23
-rw-r--r--inventory/hosts.ini2
-rw-r--r--roles/installer/raspios/image/templates/firstrun.sh.j24
4 files changed, 28 insertions, 2 deletions
diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml
index 4aa071d7..2db3ab37 100644
--- a/inventory/group_vars/chaos-at-home/network.yml
+++ b/inventory/group_vars/chaos-at-home/network.yml
@@ -41,6 +41,7 @@ network_zones:
ch-zimaplayer2: 41
ch-hdmistick: 42
ch-companion-raspi: 43
+ ch-rpi5-test: 44
ele-media: 99
ch-prometheus: 200
ch-epimetheus: 201
diff --git a/inventory/host_vars/ch-rpi5-test.yml b/inventory/host_vars/ch-rpi5-test.yml
new file mode 100644
index 00000000..ec398636
--- /dev/null
+++ b/inventory/host_vars/ch-rpi5-test.yml
@@ -0,0 +1,23 @@
+---
+raspios_variant: lite
+raspios_arch: arm64
+
+network:
+ nameservers: "{{ network_zones.lan.dns }}"
+ domain: "{{ host_domain }}"
+ primary: &_network_primary_
+ name: eth0
+ address: "{{ network_zones.lan.prefix | ansible.utils.ipaddr(network_zones.lan.offsets[inventory_hostname]) }}"
+ gateway: "{{ network_zones.lan.gateway }}"
+ interfaces:
+ - *_network_primary_
+
+raspios_boot_config:
+ - regexp: '^#?dtparam=audio='
+ line: 'dtparam=audio=on'
+ - regexp: '^#?dtoverlay=disable-bt'
+ line: 'dtoverlay=disable-bt'
+ - regexp: '^#?dtoverlay=disable-wifi'
+ line: 'dtoverlay=disable-wifi'
+
+base_entropy_generator: rngd
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index f5f9a5d5..dc29d600 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -72,6 +72,7 @@ ch-zimaplayer1 host_name=zimaplayer1
ch-zimaplayer2 host_name=zimaplayer2
ch-hdmistick host_name=hdmistick
ch-companion-raspi
+ch-rpi5-test
[chaos-at-home:children]
mz-chaos-at-home
@@ -338,6 +339,7 @@ ch-mclr
ch-octopi
ch-epimetheus
ch-companion-raspi
+ch-rpi5-test
ele-stage-raspi
ele-companion-raspi
[raspios:children]
diff --git a/roles/installer/raspios/image/templates/firstrun.sh.j2 b/roles/installer/raspios/image/templates/firstrun.sh.j2
index bc35b764..318b17dd 100644
--- a/roles/installer/raspios/image/templates/firstrun.sh.j2
+++ b/roles/installer/raspios/image/templates/firstrun.sh.j2
@@ -48,8 +48,8 @@ auto {{ network.primary.name }}
iface {{ network.primary.name }} inet dhcp
{% else %}
iface {{ network.primary.name }} inet static
- up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
- up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
+ up echo 0 > /proc/sys/net/ipv6/conf/\$IFACE/accept_ra
+ up echo 0 > /proc/sys/net/ipv6/conf/\$IFACE/autoconf
address {{ network.primary.address | ansible.utils.ipaddr('address') }}
netmask {{ network.primary.address | ansible.utils.ipaddr('netmask') }}
gateway {{ network.primary.gateway }}