mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Fix TF inventory script (#5424)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5e0140d62c
commit
eda1dcb7f6
@@ -346,7 +346,7 @@ def iter_host_ips(hosts, ips):
|
||||
'''Update hosts that have an entry in the floating IP list'''
|
||||
for host in hosts:
|
||||
host_id = host[1]['id']
|
||||
use_access_ip = host[1]['metadata']['use_access_ip']
|
||||
|
||||
if host_id in ips:
|
||||
ip = ips[host_id]
|
||||
|
||||
@@ -357,8 +357,9 @@ def iter_host_ips(hosts, ips):
|
||||
'ansible_ssh_host': ip,
|
||||
})
|
||||
|
||||
if use_access_ip == "0":
|
||||
if 'use_access_ip' in host[1]['metadata'] and ihost[1]['metadata']['use_access_ip'] == "0":
|
||||
host[1].pop('access_ip')
|
||||
|
||||
yield host
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user