Merge "Don't stream async tasks"

This commit is contained in:
Zuul 2022-04-12 15:00:17 +00:00 committed by Gerrit Code Review
commit 3f594f0721
1 changed files with 6 additions and 3 deletions

View File

@ -255,6 +255,12 @@ class CallbackModule(default.CallbackModule):
else:
task_name = task.get_name().strip()
if task.loop:
# Don't try to stream from loops
return
if task.async_val:
# Don't try to stream from async tasks
return
if task.action in ('command', 'shell'):
play_vars = self._play._variable_manager._hostvars
@ -270,9 +276,6 @@ class CallbackModule(default.CallbackModule):
if ip in ('localhost', '127.0.0.1'):
# Don't try to stream from localhost
continue
if task.loop:
# Don't try to stream from loops
continue
if play_vars[host].get('ansible_connection') in ('winrm',):
# The winrm connections don't support streaming for now
continue