diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-07-13 08:10:05 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-07-13 08:10:05 +0300 |
commit | eaa7827202ff33c0b2e5581ddd56d9cc156c1ac3 (patch) | |
tree | ff5d142a32d6fb22bafd36700d0c1b564a58e765 /installer-ansible.yml | |
parent | 08e1d205fe26fd3a18fe70d09607628f32f8177c (diff) | |
download | v-i-eaa7827202ff33c0b2e5581ddd56d9cc156c1ac3.tar.gz |
feat: configure networkd to use wifi if available
Sponsored-by: author
Diffstat (limited to 'installer-ansible.yml')
-rw-r--r-- | installer-ansible.yml | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/installer-ansible.yml b/installer-ansible.yml index b545e55..e8fddf7 100644 --- a/installer-ansible.yml +++ b/installer-ansible.yml @@ -54,16 +54,6 @@ apt_repository: repo: "deb http://deb.debian.org/debian bookworm contrib non-free non-free-firmware" - - name: "install wifi firmware" - apt: - name: - - firmware-brcm80211 - - firmware-iwlwifi - - firmware-libertas - - firmware-misc-nonfree - - firmware-realtek - - firmware-ti-connectivity - # Install vmdb2, which actually does the installation to the # target system. @@ -134,6 +124,17 @@ # Network configuration. + - name: "install wifi firmware and iwd" + apt: + name: + - firmware-brcm80211 + - firmware-iwlwifi + - firmware-libertas + - firmware-misc-nonfree + - firmware-realtek + - firmware-ti-connectivity + - iwd + - name: "remove ifupdown in favor of systemd-networkd" apt: name: ifupdown @@ -152,6 +153,9 @@ [Network] DHCP=ipv4 + + [DHCPv4] + RouteMetric=20 dest: /etc/systemd/network/eth0.network - name: "configure bridge device br0 for local network ports" @@ -186,6 +190,24 @@ ConfigureWithoutCarrier=true dest: /etc/systemd/network/br0.network + - name: "configure wifi" + copy: + content: | + [Match] + Name=wlan0 + + [Network] + DHCP=yes + + [DHCPv4] + RouteMetric=20 + dest: /etc/systemd/network/wireless.network + + - name: "enable iwd" + systemd: + name: iwd + enabled: yes + - name: "install dnsmasq" apt: name: dnsmasq |