ppf-common: fix compose_cmd to run as podman user

This commit is contained in:
Username
2026-02-18 00:22:52 +01:00
parent b6045bd05c
commit 15a7f0bb6a

View File

@@ -139,7 +139,7 @@ compose_cmd() {
local host="$1"; shift
local cmd="$*"
ansible_cmd "$host" -m raw -a \
"uid=\$(id -u podman) && cd /home/podman/ppf && sudo -u podman XDG_RUNTIME_DIR=/run/user/\$uid podman-compose $cmd"
"uid=\$(id -u podman) && sudo -u podman bash -c 'export XDG_RUNTIME_DIR=/run/user/'\$uid' && cd /home/podman/ppf && podman-compose $cmd'"
}
# ---------------------------------------------------------------------------