summaryrefslogtreecommitdiff
path: root/zuul/ansible
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-08 21:05:02 +0000
committerGerrit Code Review <review@openstack.org>2022-09-08 21:05:02 +0000
commit47227b743f0daeac5a870ab10a29ace8ecfedaf3 (patch)
treef45f78ac639c8dd2fb9d3ee39940eb10aff5a781 /zuul/ansible
parent2bc60aaf8b4049815d3e11a19abba530939a2672 (diff)
parent78050adb51b34ebcae22a9cf5dbf7fcefb71badd (diff)
downloadzuul-47227b743f0daeac5a870ab10a29ace8ecfedaf3.tar.gz
Merge "zuul_stream : Use !127.0.0.1 for loopback"
Diffstat (limited to 'zuul/ansible')
-rw-r--r--zuul/ansible/base/callback/zuul_stream.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py
index fccfdc85d..b5c14691b 100644
--- a/zuul/ansible/base/callback/zuul_stream.py
+++ b/zuul/ansible/base/callback/zuul_stream.py
@@ -48,10 +48,12 @@ from zuul.ansible import paths
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))
+
+# This is intended to be only used for testing where we change the
+# port so we can run another instance that doesn't conflict with one
+# setup by the test environment
+LOG_STREAM_PORT = int(os.environ.get("ZUUL_CONSOLE_PORT", 19885))
def zuul_filter_result(result):
@@ -322,15 +324,13 @@ 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') and
- not LOG_STREAM_LOCALHOST):
+ if (host in ('localhost', '127.0.0.1')):
# 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') and
- not LOG_STREAM_LOCALHOST):
+ if (ip in ('localhost', '127.0.0.1')):
# Don't try to stream from localhost
continue
if play_vars[host].get('ansible_connection') in ('winrm',):