From 4ea3cd3a3822b3b81af65bc8d1d186a8fd776671 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 15 Oct 2016 16:29:54 -0700 Subject: [PATCH] Fix paramiko for non-ascii become password Cherry-picked from a part of f24c10c32be86d3eb792d109fb6fdad19bbfcf4c --- lib/ansible/plugins/connection/paramiko_ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/connection/paramiko_ssh.py b/lib/ansible/plugins/connection/paramiko_ssh.py index 904ed041408..7b91f6b90df 100644 --- a/lib/ansible/plugins/connection/paramiko_ssh.py +++ b/lib/ansible/plugins/connection/paramiko_ssh.py @@ -308,7 +308,7 @@ class Connection(ConnectionBase): if passprompt: if self._play_context.become and self._play_context.become_pass: - chan.sendall(self._play_context.become_pass + '\n') + chan.sendall(to_bytes(self._play_context.become_pass, errors='strict') + b'\n') else: raise AnsibleError("A password is reqired but none was supplied") else: