diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 46f734da28..1339af7449 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -892,7 +892,7 @@ class Connection(ConnectionBase): def reset(self): # If we have a persistent ssh connection (ControlPersist), we can ask it to stop listening. - cmd = map(to_bytes, self._build_command(self._play_context.ssh_executable, '-O', 'stop', self.host)) + cmd = 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)