diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/raspios/image/templates/firstrun.sh.j2 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/raspios/image/templates/firstrun.sh.j2 b/roles/raspios/image/templates/firstrun.sh.j2 index 3166b974..65181683 100644 --- a/roles/raspios/image/templates/firstrun.sh.j2 +++ b/roles/raspios/image/templates/firstrun.sh.j2 @@ -14,7 +14,7 @@ raspi-config nonint do_net_names 1 cat <<EOF >> /etc/dhcpcd.conf # -interface eth0 +interface {{ network.primary.name }} static ip_address={{ network.primary.address }} static routers={{ network.primary.gateway }} static domain_name_servers={{ network.nameservers | join(' ') }} @@ -31,7 +31,11 @@ install -m 0644 /boot/firstrun.authorized_keys /root/.ssh/authorized_keys 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 }}" +{% else %} systemctl disable wpa_supplicant.service +{% endif %} export DEBIAN_FRONTEND=noninteractive export SUDO_FORCE_REMOVE=yes apt-get purge -q -y userconf-pi avahi-daemon triggerhappy rsync dpkg-dev patch gdb make strace ssh-import-id network-manager udisks2 p7zip p7zip-full sudo |