For some laptops, wifi is off after booting.
This commit is contained in:
parent
665109ef55
commit
ad76bbd1f1
2 changed files with 23 additions and 24 deletions
|
@ -2,12 +2,13 @@
|
|||
## wget https://cdimage.debian.org/cdimage/firmware/testing/current/firmware.cpio.gz
|
||||
## cat initrd.gz firmware.cpio.gz > initrd-fw.gz
|
||||
---
|
||||
- name: Install packages related to iwd
|
||||
- name: Install packages related to iwd and wifi
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- iwd
|
||||
- systemd-resolved
|
||||
- firmware-realtek # for our wifi sticks
|
||||
- rfkill
|
||||
state: latest
|
||||
|
||||
- name: Disable wpa-supplicant
|
||||
|
@ -32,27 +33,28 @@
|
|||
[Security]
|
||||
Passphrase={{ wifipasswd }}
|
||||
|
||||
# - name: Use iwd but ignore wlan interfaces in NetworkManager
|
||||
# blockinfile:
|
||||
# dest: /etc/NetworkManager/NetworkManager.conf
|
||||
# block: |
|
||||
# [device]
|
||||
# wifi.backend=iwd
|
||||
# match-device=interface-name:wl*
|
||||
# managed=0
|
||||
#
|
||||
# - name: Configure systemd-networkd
|
||||
# ansible.builtin.copy:
|
||||
# dest: /etc/systemd/network/80-wlan-dhcp.network
|
||||
# content: |
|
||||
# [Match]
|
||||
# Name=wl*
|
||||
# [Network]
|
||||
# DHCP=yes
|
||||
# [DHCPv4]
|
||||
# UseDomains=true
|
||||
#
|
||||
- name: Enable systemd-networkd
|
||||
ansible.builtin.systemd:
|
||||
name: systemd-networkd.service
|
||||
enabled: True
|
||||
|
||||
|
||||
- name: Provide service to enable WiFi on boot
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/enable-wifi.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Switch WiFi on
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/rfkill enable wifi
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: Enable the enable-wifi service
|
||||
ansible.builtin.systemd:
|
||||
name: enable-wifi.service
|
||||
enabled: True
|
||||
daemon_reload: True
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
## Make sure to use an initrd providing firmware:
|
||||
## wget https://cdimage.debian.org/cdimage/firmware/testing/current/firmware.cpio.gz
|
||||
## cat initrd.gz firmware.cpio.gz > initrd-fw.gz
|
||||
---
|
||||
- name: Configure WLAN for devices
|
||||
community.general.nmcli:
|
||||
|
|
Loading…
Add table
Reference in a new issue