Disable Wifi and BT

This commit is contained in:
2024-11-06 20:55:40 -05:00
parent 2ce818aa1e
commit 23c5f81511
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
---
- name: Disable Wi-Fi and Bluetooth on Raspberry Pi
hosts: all
become: yes
tasks:
- name: Ensure Wi-Fi is disabled in config.txt
lineinfile:
path: /boot/firmware/config.txt
regexp: '^#?dtoverlay=-disable-wifi'
line: 'dtoverlay=-disable-wifi'
state: present
create: yes
- name: Ensure Bluetooth is disabled in config.txt
lineinfile:
path: /boot/firmware/config.txt
regexp: '^#?dtoverlay=-disable-bt'
line: 'dtoverlay=-disable-bt'
state: present
create: yes