# https://www.raspberrypi.org/documentation/configuration/uart.md - name: enable uart become: true lineinfile: path: /boot/config.txt regexp: "^enable_uart=" line: enable_uart=1 backup: true - name: disable bluetooth become: true lineinfile: path: /boot/config.txt regexp: "^dtoverlay=" line: dtoverlay=disable-bt backup: true - name: hidden splash message become: true lineinfile: path: /boot/config.txt regexp: "^disable_splash=" line: disable_splash=1 backup: true - name: disable debug port & logo become: true ansible.builtin.replace: path: /boot/cmdline.txt regexp: "console=serial0,115200" replace: "loglevel=3 logo.nologo" backup: true - name: disable hciuart service become: true ansible.builtin.systemd: name: hciuart enabled: no masked: yes