Merge "nodepool-base: prefer ZK IPv6 addresses"
This commit is contained in:
commit
4930d44311
@ -29,8 +29,15 @@ def main():
|
||||
zk_hosts = []
|
||||
try:
|
||||
for host in p['zk_group']:
|
||||
# Prefer public_v6 if set, otherwise ansible_host
|
||||
addr = None
|
||||
if 'public_v6' in p['hostvars'][host]:
|
||||
addr = p['hostvars'][host]['public_v6']
|
||||
if not addr:
|
||||
addr = p['hostvars'][host]['ansible_host']
|
||||
|
||||
zk_hosts.append(dict(
|
||||
host=p['hostvars'][host]['ansible_host'],
|
||||
host=addr,
|
||||
port=2281
|
||||
))
|
||||
module.exit_json(hosts=zk_hosts, changed=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user