mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add work-around for ssh pty race condition.
This should minimize loss of stdout when using a pty and connecting with ssh or paramiko_ssh.
This commit is contained in:
@@ -711,6 +711,9 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||
if self._connection.allow_executable:
|
||||
if executable is None:
|
||||
executable = self._play_context.executable
|
||||
# mitigation for SSH race which can drop stdout (https://github.com/ansible/ansible/issues/13876)
|
||||
# only applied for the default executable to avoid interfering with the raw action
|
||||
cmd = self._connection._shell.append_command(cmd, 'sleep 0')
|
||||
if executable:
|
||||
cmd = executable + ' -c ' + pipes.quote(cmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user