Make it possible to disable access_ip (openstack provider) (#5239)
* Add a variable do disable access_ip * Document the use of use_access_ip
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
0ba336b04e
commit
a8c5a0afdc
@ -339,14 +339,19 @@ 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]
|
||||
|
||||
host[1].update({
|
||||
'access_ip_v4': ip,
|
||||
'access_ip': ip,
|
||||
'public_ipv4': ip,
|
||||
'ansible_ssh_host': ip,
|
||||
})
|
||||
|
||||
if use_access_ip == "0":
|
||||
host[1].pop('access_ip')
|
||||
yield host
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user