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
|
## wget https://cdimage.debian.org/cdimage/firmware/testing/current/firmware.cpio.gz
|
||||||
## cat initrd.gz firmware.cpio.gz > initrd-fw.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:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- iwd
|
- iwd
|
||||||
- systemd-resolved
|
- systemd-resolved
|
||||||
- firmware-realtek # for our wifi sticks
|
- firmware-realtek # for our wifi sticks
|
||||||
|
- rfkill
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Disable wpa-supplicant
|
- name: Disable wpa-supplicant
|
||||||
|
@ -32,27 +33,28 @@
|
||||||
[Security]
|
[Security]
|
||||||
Passphrase={{ wifipasswd }}
|
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
|
- name: Enable systemd-networkd
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: systemd-networkd.service
|
name: systemd-networkd.service
|
||||||
enabled: True
|
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
|
- name: Configure WLAN for devices
|
||||||
community.general.nmcli:
|
community.general.nmcli:
|
||||||
|
|
Loading…
Add table
Reference in a new issue