diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 37a69e46b..58e7c5f3b 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -20,7 +20,7 @@ - name: Install Bluetooth - only on Raspberry Pi include_role: name: bluetooth - when: is_raspbian and bluetooth_install + when: rpi_model != "none" and bluetooth_install - name: USB_LIB include_role: diff --git a/roles/bluetooth/tasks/install.yml b/roles/bluetooth/tasks/install.yml index be7378b13..cac7d729b 100644 --- a/roles/bluetooth/tasks/install.yml +++ b/roles/bluetooth/tasks/install.yml @@ -1,4 +1,17 @@ -- name: "Install bluetooth packages" +- name: Disable built-in serial uart in /boot/firmware/usercfg.txt on ubuntu + lineinfile: + path: /boot/firmware/usercfg.txt + line: "enable_uart=0" + state: present + when: is_ubuntu and rpi_model != "none" + +- name: Install pi-bluetooth package on Ubuntu + package: + name: pi-bluetooth + state: present + when: is_ubuntu and rpi_model != "none" + +- name: Install bluetooth packages package: name: - bluetooth @@ -43,7 +56,7 @@ dest: /etc/systemd/system/bluetooth.service src: /lib/systemd/system/bluetooth.service -- name: Add -C --noplugin=sap to execStart of bluetooth service +- name: Add -C --noplugin=sap to execStart of bluetooth service lineinfile: path: /etc/systemd/system/bluetooth.service regexp: '^ExecStart=/usr/lib/bluetooth/bluetoothd'