34 lines
739 B
YAML
34 lines
739 B
YAML
---
|
|
# tasks file for bluetooth
|
|
|
|
- name: Install Bluetooth packages
|
|
pacman:
|
|
name:
|
|
- bluez
|
|
- bluez-utils
|
|
- pulseaudio-bluetooth
|
|
become: yes
|
|
notify:
|
|
- restart pulse as user
|
|
|
|
- name: Auto-switch between HSP/HSF and A2DP
|
|
lineinfile:
|
|
dest: /etc/pulse/default.pa
|
|
regex: "^load-module module-bluetooth-policy"
|
|
state: present
|
|
line: "load-module module-bluetooth-policy auto_switch=2"
|
|
notify:
|
|
- restart pulse as user
|
|
become: yes
|
|
|
|
|
|
- name: Unblock the bluetooth service
|
|
service: name="rfkill-block@bluetooth.service" enabled=no state=stopped
|
|
become: yes
|
|
|
|
|
|
- name: Enable and start the bluetooth service
|
|
service: name=bluetooth.service enabled=yes state=started
|
|
become: yes
|
|
|
|
|