From 87dd3cd37ad9b11cc780d3c87989b9944c193923 Mon Sep 17 00:00:00 2001 From: Andreas Scherbaum Date: Sat, 20 May 2023 00:57:01 +0200 Subject: [PATCH] Change verbosity code, use self._display.verbosity instead of self._play_context.verbosity (#54) --- lxc_ssh.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lxc_ssh.py b/lxc_ssh.py index 621e020..ef5153c 100644 --- a/lxc_ssh.py +++ b/lxc_ssh.py @@ -728,7 +728,11 @@ def _build_command(self, binary, subsystem, *other_args): self._add_args(b_command, b_args, "disable batch mode for sshpass") b_command += [b"-b", b"-"] - if self._play_context.verbosity > 3: + if self._display.verbosity == 1: + b_command.append(b"-v") + elif self._display.verbosity == 2: + b_command.append(b"-vv") + elif self._display.verbosity >= 3: b_command.append(b"-vvv") # Next, we add ssh_args