Apply localhost workaround if ansible_host is localhost
This shouldn't really ever happen for real in zuul, but just in case we do something in a trusted playbook somewhere like setting ansible_host to localhost, the code should at least do the right thing. (This comes up more in doing local testing of plugins) Change-Id: I638fa5f8cd69cd46823ea42bc4e257972d125945
This commit is contained in:
parent
9de422f55b
commit
2e8052b40a
|
@ -172,6 +172,9 @@ class CallbackModule(default.CallbackModule):
|
|||
ip = play_vars[host].get(
|
||||
'ansible_host', play_vars[host].get(
|
||||
'ansible_inventory_host'))
|
||||
if ip in ('localhost', '127.0.0.1'):
|
||||
# Don't try to stream from localhost
|
||||
continue
|
||||
streamer = threading.Thread(
|
||||
target=self._read_log, args=(
|
||||
host, ip, log_id, task_name, hosts))
|
||||
|
|
Loading…
Reference in New Issue