homeassistant: Add support for zigbee dongle
This commit is contained in:
parent
8c66c9a6a0
commit
a4660f69cf
5 changed files with 19 additions and 1 deletions
1
roles/homeassistant/files/99-homeassistant.rules
Normal file
1
roles/homeassistant/files/99-homeassistant.rules
Normal file
|
@ -0,0 +1 @@
|
|||
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0660", GROUP="ha"
|
Binary file not shown.
|
@ -1,11 +1,12 @@
|
|||
|
||||
module homeassistant-local 1.0;
|
||||
module homeassistant-local 1.1;
|
||||
|
||||
require {
|
||||
type container_t;
|
||||
type system_dbusd_var_run_t;
|
||||
type system_dbusd_t;
|
||||
type bluetooth_t;
|
||||
class dir read;
|
||||
class sock_file write;
|
||||
class unix_stream_socket connectto;
|
||||
class dbus send_msg;
|
||||
|
@ -18,4 +19,5 @@ allow bluetooth_t container_t:dbus send_msg;
|
|||
allow container_t bluetooth_t:dbus send_msg;
|
||||
allow container_t system_dbusd_t:dbus send_msg;
|
||||
allow container_t system_dbusd_t:unix_stream_socket connectto;
|
||||
allow container_t system_dbusd_var_run_t:dir read;
|
||||
allow container_t system_dbusd_var_run_t:sock_file write;
|
||||
|
|
|
@ -55,6 +55,20 @@
|
|||
setype: container_file_t
|
||||
when: ansible_selinux_python_present
|
||||
|
||||
- name: Allow podman to use devices
|
||||
ansible.posix.seboolean:
|
||||
name: container_use_devices
|
||||
state: true
|
||||
persistent: true
|
||||
|
||||
- name: Allow ha to connect specific devices
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/99-homeassistant.rules
|
||||
src: 99-homeassistant.rules
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: /export/homeassistant
|
||||
|
|
|
@ -10,6 +10,7 @@ ExecStart=/usr/bin/podman run \
|
|||
--name homeassistant \
|
||||
--env TZ=Europe/Helsinki \
|
||||
--userns keep-id \
|
||||
--device /dev/ttyUSB0 \
|
||||
--volume /run/dbus:/run/dbus:ro \
|
||||
--volume /srv/homeassistant:/config:rw \
|
||||
docker.io/homeassistant/home-assistant:{{ homeassistant_version }}
|
||||
|
|
Loading…
Add table
Reference in a new issue