From 23f6b16a3cf30cc6b87ed62496e180be5f125177 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 4 Apr 2025 02:13:20 +0200 Subject: setup: fix access to ttyUSB0 from rootless container * keep-groups: allows container processes to use supplementary groups * device idempotency issue fixed with [1] [1] https://github.com/containers/ansible-podman-collections/pull/611 --- setup.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'setup.yml') diff --git a/setup.yml b/setup.yml index bca609b..6d3e03e 100644 --- a/setup.yml +++ b/setup.yml @@ -109,12 +109,11 @@ containers.podman.podman_container: name: homeassistant image: ghcr.io/home-assistant/home-assistant:stable - #privileged: true network: host + # Keep groups, eg dialout for ttyUSB0. + group_add: keep-groups volumes: - "{{ data }}/home-assistant/config:/config" - "/etc/localtime:/etc/localtime:ro" device: - # Podman somehow stores the device file all lower-case. - # Writing it as /dev/ttyUSB0 is treated as a change. - - "/dev/ttyusb0:/dev/ttyusb0" + - "/dev/ttyUSB0:/dev/ttyUSB0" -- cgit v1.2.3