mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fixes to handle non-ascii become passwords
Fixes for non-ascii passwords on * both python2 and python3, * local and paramiko_ssh (ssh tested working with these changes) * sudo and su Fixes #16557
This commit is contained in:
@@ -310,7 +310,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) + b'\n')
|
||||
else:
|
||||
raise AnsibleError("A password is reqired but none was supplied")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user