mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727
This commit is contained in:
committed by
Toshio Kuratomi
parent
fb18338cdc
commit
29c1d5cb5d
@@ -780,6 +780,9 @@ class Connection(ConnectionBase):
|
||||
if self._flags['become_prompt']:
|
||||
display.debug('Sending become_pass in response to prompt')
|
||||
stdin.write(to_bytes(self._play_context.become_pass) + b'\n')
|
||||
# On python3 stdin is a BufferedWriter, and we don't have a guarantee
|
||||
# that the write will happen without a flush
|
||||
stdin.flush()
|
||||
self._flags['become_prompt'] = False
|
||||
state += 1
|
||||
elif self._flags['become_success']:
|
||||
|
||||
Reference in New Issue
Block a user