--- - include_vars: bluetooth-devices.yml tags: - vars - name: install pkg for bluetooth audio package: name: virtual_oss state: present become: true tags: - install - name: generate BT configs template: src: "{{ BT_TEMPLATE.src }}" dest: "{{ BT_TEMPLATE.dest }}" loop_control: loop_var: BT_TEMPLATE tags: - configuration become: true loop: - src: bluetooth_hcsecd.conf.j2 dest: "/etc/bluetooth/hcsecd.conf" # https://gist.github.com/david-moran/1a9e4f910749d66d93e3fa71f3f68c98 # https://www.freebsd.org/doc/handbook/network-bluetooth.html - name: load the bt modules lineinfile: path: "/etc/rc.conf" regexp: "^{{ item.name }}" line: "{{ item.name }}={{ item.val }}" become: true tags: - configuration loop: "{{ sysctl_setting }}" vars: sysctl_setting: - name: "hcsecd_enable" val: "YES" - name: "sdpd_enable" val: "YES" - name: "bthidd_enable" val: "YES" - name: load the bt module lineinfile: path: "/boot/loader.conf" regexp: "^{{ item.name }}" line: "{{ item.name }}={{ item.val }}" become: true loop: "{{ sysctl_setting }}" vars: sysctl_setting: - name: "ng_ubt_load" val: "YES"