diff options
author | Zuul <zuul@review.opendev.org> | 2022-09-08 07:17:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-09-08 07:17:40 +0000 |
commit | 2bc60aaf8b4049815d3e11a19abba530939a2672 (patch) | |
tree | 276d636124a3f1f8383c85e0da7b9300e175fe9f /zuul/ansible | |
parent | 2d986f8566000c53eae111fc82aebccd2c0e79b1 (diff) | |
parent | 34543b8ac55348bc7d55f465231d6f9ca7aded3d (diff) | |
download | zuul-2bc60aaf8b4049815d3e11a19abba530939a2672.tar.gz |
Merge "zuul-stream : Test against a Python 2.7 container"
Diffstat (limited to 'zuul/ansible')
-rw-r--r-- | zuul/ansible/base/callback/zuul_stream.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py index 664bf8417..fccfdc85d 100644 --- a/zuul/ansible/base/callback/zuul_stream.py +++ b/zuul/ansible/base/callback/zuul_stream.py @@ -50,6 +50,8 @@ from zuul.ansible import logconfig LOG_STREAM_PORT = int(os.environ.get("ZUUL_CONSOLE_PORT", 19885)) LOG_STREAM_VERSION = 0 +# +LOG_STREAM_LOCALHOST = int(os.environ.get("ZUUL_CONSOLE_STREAM_LOCALHOST", 0)) def zuul_filter_result(result): @@ -320,13 +322,15 @@ class CallbackModule(default.CallbackModule): hosts = self._get_task_hosts(task) for host, inventory_hostname in hosts: port = LOG_STREAM_PORT - if host in ('localhost', '127.0.0.1'): + if (host in ('localhost', '127.0.0.1') and + not LOG_STREAM_LOCALHOST): # Don't try to stream from localhost continue ip = play_vars[host].get( 'ansible_host', play_vars[host].get( 'ansible_inventory_host')) - if ip in ('localhost', '127.0.0.1'): + if (ip in ('localhost', '127.0.0.1') and + not LOG_STREAM_LOCALHOST): # Don't try to stream from localhost continue if play_vars[host].get('ansible_connection') in ('winrm',): |