From f62969b2c2023a7a4a49ebabbdcdbd72c26059ef Mon Sep 17 00:00:00 2001 From: Raphael Dannecker Date: Tue, 30 Jan 2024 08:26:55 +0100 Subject: [PATCH] remove deprecated networkd and NetworkManager entries --- lmn-client.yml | 8 +++++++ roles/lmn_wlan_iwd/tasks/main.yml | 40 +++++++++++++++---------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/lmn-client.yml b/lmn-client.yml index 100a088..2e06594 100644 --- a/lmn-client.yml +++ b/lmn-client.yml @@ -233,3 +233,11 @@ when: ansible_interfaces | select('search', 'wl.+') | first is defined - lmn_networkd - lmn_localuser + tasks: + - name: Remove deprecated files and directories (laptop-class) + file: + path: "{{ item }}" + state: absent + with_items: + - /etc/systemd/network/80-wlan-dhcp.network + diff --git a/roles/lmn_wlan_iwd/tasks/main.yml b/roles/lmn_wlan_iwd/tasks/main.yml index 17780e8..8eb2960 100644 --- a/roles/lmn_wlan_iwd/tasks/main.yml +++ b/roles/lmn_wlan_iwd/tasks/main.yml @@ -31,26 +31,26 @@ [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: 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