feat(arch): install bluetooth utilities
This commit is contained in:
parent
8f62302af0
commit
f6594de7ee
35
roles/arch-post-setup/tasks/bluetooth.yml
Normal file
35
roles/arch-post-setup/tasks/bluetooth.yml
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
# 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'
|
@ -155,5 +155,10 @@
|
||||
state: present
|
||||
|
||||
- name: Import Other Arch Tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: reflector.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: '{{ task }}'
|
||||
loop_control:
|
||||
loop_var: task
|
||||
loop:
|
||||
- reflector.yml
|
||||
- bluetooth.yml
|
||||
|
Loading…
Reference in New Issue
Block a user