From e35f622a0dfa93d1fbeab17e285e28c9510ce603 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 18 Feb 2023 12:19:58 -0500 Subject: [PATCH] Enable bluetooth in linux. --- ansible/roles/blank/tasks/linux.yaml | 8 ++++++++ .../bluetooth/files/bluetooth_loader.conf | 1 - ansible/roles/bluetooth/tasks/freebsd.yaml | 9 --------- ansible/roles/bluetooth/tasks/linux.yaml | 19 ++++++++++++++----- 4 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 ansible/roles/bluetooth/files/bluetooth_loader.conf diff --git a/ansible/roles/blank/tasks/linux.yaml b/ansible/roles/blank/tasks/linux.yaml index 429ad91..43ba876 100644 --- a/ansible/roles/blank/tasks/linux.yaml +++ b/ansible/roles/blank/tasks/linux.yaml @@ -19,3 +19,11 @@ # name: # - foo # state: present + +# - name: Enable services +# systemd: +# enabled: yes +# name: "{{ item }}" +# daemon_reload: yes +# loop: +# - foo.service diff --git a/ansible/roles/bluetooth/files/bluetooth_loader.conf b/ansible/roles/bluetooth/files/bluetooth_loader.conf deleted file mode 100644 index ffce4e4..0000000 --- a/ansible/roles/bluetooth/files/bluetooth_loader.conf +++ /dev/null @@ -1 +0,0 @@ -ng_ubt_load="YES" diff --git a/ansible/roles/bluetooth/tasks/freebsd.yaml b/ansible/roles/bluetooth/tasks/freebsd.yaml index 42acef1..e69de29 100644 --- a/ansible/roles/bluetooth/tasks/freebsd.yaml +++ b/ansible/roles/bluetooth/tasks/freebsd.yaml @@ -1,9 +0,0 @@ -- name: Install loader.conf - copy: - src: "files/{{ item }}_loader.conf" - dest: "/boot/loader.conf.d/{{ item }}.conf" - mode: 0644 - owner: root - group: wheel - loop: - - bluetooth diff --git a/ansible/roles/bluetooth/tasks/linux.yaml b/ansible/roles/bluetooth/tasks/linux.yaml index 429ad91..0ee1f95 100644 --- a/ansible/roles/bluetooth/tasks/linux.yaml +++ b/ansible/roles/bluetooth/tasks/linux.yaml @@ -14,8 +14,17 @@ # state: present # update_cache: true -# - name: Install packages -# package: -# name: -# - foo -# state: present +- name: Install packages + package: + name: + - bluez + - bluez-utils + state: present + +- name: Enable services + systemd: + enabled: yes + name: "{{ item }}" + daemon_reload: yes + loop: + - bluetooth.service