From 720d7f279808c608f501e176aad7427cba2bcf92 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 15 Mar 2020 06:24:02 -0500 Subject: [PATCH 1/4] bluetooth network support for ubuntu on rpi --- roles/4-server-options/tasks/main.yml | 2 +- roles/bluetooth/tasks/install.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 37a69e46b..462086d0f 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: not (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..0ffe7e6ab 100644 --- a/roles/bluetooth/tasks/install.yml +++ b/roles/bluetooth/tasks/install.yml @@ -1,3 +1,10 @@ +- name: "Install pi-bluetooth package on Ubuntu" + package: + name: + - pi-bluetooth + state: present + when: is_ubuntu and not (rpi_model == "none") + - name: "Install bluetooth packages" package: name: From 7d96b1a4691ec8bd2705b4af9a5f59e08e69d98f Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 23 Apr 2020 10:05:00 -0500 Subject: [PATCH 2/4] add usercfg.txt alteration --- roles/bluetooth/tasks/install.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/bluetooth/tasks/install.yml b/roles/bluetooth/tasks/install.yml index 0ffe7e6ab..c57b18883 100644 --- a/roles/bluetooth/tasks/install.yml +++ b/roles/bluetooth/tasks/install.yml @@ -1,9 +1,16 @@ +- 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 not (rpi_model == "none") + - name: "Install pi-bluetooth package on Ubuntu" package: name: - pi-bluetooth state: present - when: is_ubuntu and not (rpi_model == "none") + when: is_ubuntu and not (rpi_model == "none") - name: "Install bluetooth packages" package: From a092b06f57b0645a31b9c7074279fd522548c104 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 23 Apr 2020 11:28:56 -0400 Subject: [PATCH 3/4] Update roles/bluetooth/tasks/install.yml --- roles/bluetooth/tasks/install.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/roles/bluetooth/tasks/install.yml b/roles/bluetooth/tasks/install.yml index c57b18883..cac7d729b 100644 --- a/roles/bluetooth/tasks/install.yml +++ b/roles/bluetooth/tasks/install.yml @@ -3,16 +3,15 @@ path: /boot/firmware/usercfg.txt line: "enable_uart=0" state: present - when: is_ubuntu and not (rpi_model == "none") + when: is_ubuntu and rpi_model != "none" -- name: "Install pi-bluetooth package on Ubuntu" +- name: Install pi-bluetooth package on Ubuntu package: - name: - - pi-bluetooth + name: pi-bluetooth state: present - when: is_ubuntu and not (rpi_model == "none") + when: is_ubuntu and rpi_model != "none" -- name: "Install bluetooth packages" +- name: Install bluetooth packages package: name: - bluetooth @@ -57,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' From 3d2386c5792c3e81ed463a3ea216f542bb7da6c8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 23 Apr 2020 11:35:07 -0400 Subject: [PATCH 4/4] Update roles/4-server-options/tasks/main.yml --- roles/4-server-options/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 462086d0f..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: not (rpi_model == "none") and bluetooth_install + when: rpi_model != "none" and bluetooth_install - name: USB_LIB include_role: