homeassistant: Add bluetooth support
This commit is contained in:
parent
1285656eae
commit
7b88de9100
4 changed files with 59 additions and 0 deletions
|
@ -10,6 +10,42 @@
|
|||
group: ha
|
||||
shell: /sbin/nologin
|
||||
|
||||
- name: Install dependencies
|
||||
ansible.builtin.package:
|
||||
name: bluez
|
||||
state: installed
|
||||
|
||||
- name: Enable bluetooth services
|
||||
ansible.builtin.service:
|
||||
name: bluetooth
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Copy SELinux module
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/share/selinux/homeassistant-local.pp
|
||||
src: homeassistant-local.pp
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Check if selinux module is loaded
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- semodule
|
||||
- -l
|
||||
register: result
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
|
||||
- name: Install SELinux module
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- semodule
|
||||
- -i
|
||||
- /usr/local/share/selinux/homeassistant-local.pp
|
||||
when: '"homeassistant-local" not in result.stdout_lines'
|
||||
|
||||
- name: Fix SELinux contexts from config directory
|
||||
community.general.sefcontext:
|
||||
path: /export/homeassistant(/.*)?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue