diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 12bdaf59e3b..2ddb5ffe956 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -894,9 +894,9 @@ class Connection(ConnectionBase): cmd = map(to_bytes, self._build_command(self._play_context.ssh_executable, '-O', 'stop', self.host)) controlpersist, controlpath = self._persistence_controls(cmd) if controlpersist: + display.vvv(u'sending stop: %s' % cmd) p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() - display.vvv(u'sending stop: %s' % cmd) self.close()