Dot_Files/roles/arch-post-setup/tasks/bluetooth.yml

36 lines
1.0 KiB
YAML

---
# Installs a gui (Blueman), and bluez utils for bluetoothctl
- name: Install Bluetooth tools
become: true
community.general.pacman:
name:
- blueman
- bluez-utils
state: present
- name: Ensure Bluetooth Service is Enabled and Running
ansible.builtin.systemd:
name: bluetooth.service
state: started
enabled: true
- name: Ensure Polkit Perms are in Place for Blueman
become: true
ansible.builtin.copy:
content: |
/* Allow users in wheel group to use blueman feature requiring root without authentication */
polkit.addRule(function(action, subject) {
if ((action.id == "org.blueman.network.setup" ||
action.id == "org.blueman.dhcp.client" ||
action.id == "org.blueman.rfkill.setstate" ||
action.id == "org.blueman.pppd.pppconnect") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
dest: /etc/polkit-1/rules.d/51-blueman.rules
owner: root
group: polkitd
mode: '0644'