raspbian.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # https://www.raspberrypi.org/documentation/configuration/uart.md
  2. - name: backup /boot/config.txt
  3. become: true
  4. ansible.builtin.copy:
  5. src: /boot/config.txt
  6. dest: "{{ app_backup }}/boot_config_txt"
  7. remote_src: yes
  8. backup: yes
  9. - name: enable uart
  10. become: true
  11. lineinfile:
  12. path: /boot/config.txt
  13. regexp: '^enable_uart='
  14. line: enable_uart=1
  15. - name: disable bluetooth
  16. become: true
  17. lineinfile:
  18. path: /boot/config.txt
  19. regexp: '^dtoverlay='
  20. line: dtoverlay=disable-bt
  21. - name: hidden splash message
  22. become: true
  23. lineinfile:
  24. path: /boot/config.txt
  25. regexp: '^disable_splash='
  26. line: disable_splash=1
  27. - name: backup /boot/cmdline.txt
  28. become: true
  29. ansible.builtin.copy:
  30. src: /boot/cmdline.txt
  31. dest: "{{ app_backup }}/boot_cmdline_txt"
  32. remote_src: yes
  33. backup: yes
  34. - name: disable debug port & logo
  35. become: true
  36. ansible.builtin.replace:
  37. path: /boot/cmdline.txt
  38. regexp: 'console=serial0,115200'
  39. replace: 'loglevel=3 logo.nologo'
  40. - name: disable hciuart service
  41. become: true
  42. ansible.builtin.systemd:
  43. name: hciuart
  44. enabled: no
  45. masked: yes