From 6eaba11664a41c83781d92d6657e077fb4b70d26 Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Wed, 6 Nov 2024 21:09:38 -0500 Subject: [PATCH] Disable Leds --- playbooks/disable_leds.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 playbooks/disable_leds.yml diff --git a/playbooks/disable_leds.yml b/playbooks/disable_leds.yml new file mode 100644 index 0000000..349544d --- /dev/null +++ b/playbooks/disable_leds.yml @@ -0,0 +1,28 @@ +--- +- name: Disable Wi-Fi and Bluetooth on Raspberry Pi + hosts: all + become: yes + tasks: + - name: Ensure Led disabled in config.txt + lineinfile: + path: /boot/firmware/config.txt + regexp: '^#?dtparam=act_led_trigger=none' + line: 'dtparam=act_led_trigger=none' + state: present + create: yes + + - name: Ensure Act Led is disabled in config.txt + lineinfile: + path: /boot/firmware/config.txt + regexp: '^#?dtparam=act_led_activelow=off' + line: 'dtparam=act_led_activelow=off' + state: present + create: yes + + - name: Ensure Pwr Led is disabled in config.txt + lineinfile: + path: /boot/firmware/config.txt + regexp: '^#?dtparam=pwr_led_activelow=off' + line: 'dtparam=pwr_led_activelow=off' + state: present + create: yes