-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwipe-drivers.yml
More file actions
47 lines (40 loc) · 1.18 KB
/
wipe-drivers.yml
File metadata and controls
47 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Remove installed WiFi drivers
hosts: all
become: yes
remote_user: s4228665
tasks:
- name: Unload 8821au kernel module
community.general.modprobe:
name: 8821au
state: absent
failed_when: false
- name: Remove 8821au from modules-load.d
file:
path: /etc/modules-load.d/rtl8821au.conf
state: absent
- name: Check if 8821au is installed via DKMS
shell: dkms status 8821au
register: dkms_status
failed_when: false
changed_when: false
- name: Remove 8821au from DKMS
shell: dkms remove 8821au/{{ item }} --all
with_items: "{{ dkms_status.stdout_lines }}"
when:
- dkms_status.rc == 0
- item != ""
failed_when: false
register: dkms_remove
- name: Remove RTL8821AU driver source directory
file:
path: /usr/src/rtl8821au-driver
state: absent
- name: Verify 8821au module is unloaded
shell: lsmod | grep -c 8821au || echo "not_loaded"
register: verify_unload
changed_when: false
failed_when: false
- name: Display removal status
debug:
msg: "RTL8821AU driver has been successfully removed"