--- - 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