1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

become_pass needs to be bytes when it is passed to ssh.

Fixes #13240
This commit is contained in:
Toshio Kuratomi 2015-12-10 07:28:58 -08:00
parent 308f6a4dd6
commit 1dda8158ff

View file

@ -463,7 +463,7 @@ class Connection(ConnectionBase):
if states[state] == 'awaiting_prompt':
if self._flags['become_prompt']:
display.debug('Sending become_pass in response to prompt')
stdin.write(self._play_context.become_pass + '\n')
stdin.write('{0}\n'.format(to_bytes(self._play_context.become_pass )))
self._flags['become_prompt'] = False
state += 1
elif self._flags['become_success']: