From 478b25c6361de5da70149f2f4c9d1eb9d87c9550 Mon Sep 17 00:00:00 2001 From: Peter Siegel Date: Sun, 2 Feb 2025 02:30:09 +0100 Subject: [PATCH] fix: better logging --- plugins/connection/lxd.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index dbd25ad2da..4abff97065 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -167,12 +167,12 @@ class Connection(ConnectionBase): rc, uid_out, err = self.exec_command("/bin/id -u") if rc != 0: - raise AnsibleError(f"Failed to get remote uid: {err.strip()}") + raise AnsibleError(f"Failed to get remote uid for user {self.get_option('remote_user')}: {err}") uid = uid_out.strip() rc, gid_out, err = self.exec_command("/bin/id -g") if rc != 0: - raise AnsibleError(f"Failed to get remote gid: {err.strip()}") + raise AnsibleError(f"Failed to get remote gid for user {self.get_option('remote_user')}: {err}") gid = gid_out.strip() return uid, gid @@ -200,7 +200,6 @@ class Connection(ConnectionBase): in_path, f"{self.get_option('remote')}:{self._host()}/{out_path}" ]) - self._display.vvvvv(f"PUT COMMAND: {local_cmd}", host=self._host()) local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]