mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
skip false values from preferred_ip
This commit is contained in:
parent
db359ff2c3
commit
f829d6f9fc
@ -228,6 +228,8 @@ def create(vm_):
|
||||
)
|
||||
for private_ip in private:
|
||||
private_ip = preferred_ip(vm_, [private_ip])
|
||||
if private_ip is False:
|
||||
continue
|
||||
if salt.utils.cloud.is_public_ip(private_ip):
|
||||
log.warning('%s is a public IP', private_ip)
|
||||
data.public_ips.append(private_ip)
|
||||
|
@ -833,6 +833,8 @@ def create(vm_):
|
||||
)
|
||||
for private_ip in private:
|
||||
private_ip = preferred_ip(vm_, [private_ip])
|
||||
if private_ip is False:
|
||||
continue
|
||||
if salt.utils.cloud.is_public_ip(private_ip):
|
||||
log.warn('{0} is a public IP'.format(private_ip))
|
||||
data.public_ips.append(private_ip)
|
||||
|
@ -718,6 +718,8 @@ def create(vm_):
|
||||
)
|
||||
for private_ip in private:
|
||||
private_ip = preferred_ip(vm_, [private_ip])
|
||||
if private_ip is False:
|
||||
continue
|
||||
if salt.utils.cloud.is_public_ip(private_ip):
|
||||
log.warn('{0} is a public IP'.format(private_ip))
|
||||
data.public_ips.append(private_ip)
|
||||
|
@ -286,6 +286,8 @@ def create(vm_):
|
||||
)
|
||||
for private_ip in private:
|
||||
private_ip = preferred_ip(vm_, [private_ip])
|
||||
if private_ip is False:
|
||||
continue
|
||||
if salt.utils.cloud.is_public_ip(private_ip):
|
||||
log.warn('{0} is a public IP'.format(private_ip))
|
||||
data.public_ips.append(private_ip)
|
||||
|
Loading…
Reference in New Issue
Block a user