diff --git a/tools/lib/ppf-common.sh b/tools/lib/ppf-common.sh index 40c7641..d3cbb47 100644 --- a/tools/lib/ppf-common.sh +++ b/tools/lib/ppf-common.sh @@ -105,7 +105,7 @@ ansible_cmd() { # shellcheck disable=SC1090 . "$ANSIBLE_VENV" cd "$ANSIBLE_DIR" - ansible -i "$PPF_INVENTORY" "$@" + ansible -i "$PPF_INVENTORY" --become "$@" ) } @@ -130,7 +130,7 @@ podman_cmd() { local host="$1"; shift local cmd="$*" ansible_cmd "$host" -m raw -a \ - "uid=\$(id -u podman) && sudo -u podman XDG_RUNTIME_DIR=/run/user/\$uid $cmd" + "uid=\$(id -u podman) && cd /tmp && sudo -u podman XDG_RUNTIME_DIR=/run/user/\$uid $cmd" } # Run a podman-compose subcommand on a remote host.