diff options
author | James E. Blair <jim@acmegating.com> | 2023-04-10 09:44:47 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2023-04-10 11:14:00 -0700 |
commit | 70077ee6d5ab254c02294a6d0f6c6f518d16d96a (patch) | |
tree | b8a6f872caa57cffd07de4953593215e3bc3a55f /zuul/ansible/base | |
parent | b2dc863b44d6b546f6609cfe8707f40c55b8aede (diff) | |
download | zuul-70077ee6d5ab254c02294a6d0f6c6f518d16d96a.tar.gz |
Do not wait for streamer when disabled
When a user sets zuul_console_disabled, we don't need to try to
connect to the streaming daemon. In fact, they may have set it
because they know it won't be running. Check for this and avoid
the connection step in that case and therefore avoid the extraneous
"Waiting on logger" messages and extra 30 second delay at the end
of each task.
Change-Id: I86af231f1ca1c5b54b21daae29387a8798190a58
Diffstat (limited to 'zuul/ansible/base')
-rw-r--r-- | zuul/ansible/base/callback/zuul_stream.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py index b5c14691b..3f886c797 100644 --- a/zuul/ansible/base/callback/zuul_stream.py +++ b/zuul/ansible/base/callback/zuul_stream.py @@ -44,6 +44,7 @@ import time from ansible.plugins.callback import default from ansible.module_utils._text import to_text +from ansible.module_utils.parsing.convert_bool import boolean from zuul.ansible import paths from zuul.ansible import logconfig @@ -333,6 +334,10 @@ class CallbackModule(default.CallbackModule): if (ip in ('localhost', '127.0.0.1')): # Don't try to stream from localhost continue + if boolean(play_vars[host].get( + 'zuul_console_disabled', False)): + # The user has told us not to even try + continue if play_vars[host].get('ansible_connection') in ('winrm',): # The winrm connections don't support streaming for now continue |