mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07: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:
parent
efc5dac52c
commit
f24c10c32b
3 changed files with 42 additions and 41 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue