Handle blank public_ipv4
Some clouds such as limestone have no public_ipv4; handle this in the firewall setup Change-Id: Id4a8032a6a14a040d62d1c70bf5e6e789fd8ff55
This commit is contained in:
parent
ad683253ed
commit
3230139d65
@ -3,8 +3,12 @@
|
|||||||
ipv4_addresses: >
|
ipv4_addresses: >
|
||||||
{% set hosts = [] -%}
|
{% set hosts = [] -%}
|
||||||
{% for host, vars in hostvars.items() -%}
|
{% for host, vars in hostvars.items() -%}
|
||||||
{% set _ = hosts.append(vars['nodepool']['private_ipv4']) -%}
|
{% if vars['nodepool']['private_ipv4'] -%}
|
||||||
{% set _ = hosts.append(vars['nodepool']['public_ipv4']) -%}
|
{% set _ = hosts.append(vars['nodepool']['private_ipv4']) -%}
|
||||||
|
{% endif -%}
|
||||||
|
{% if vars['nodepool']['public_ipv4'] -%}
|
||||||
|
{% set _ = hosts.append(vars['nodepool']['public_ipv4']) -%}
|
||||||
|
{% endif -%}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
{{- hosts | sort | unique -}}
|
{{- hosts | sort | unique -}}
|
||||||
ipv6_addresses: >
|
ipv6_addresses: >
|
||||||
|
Loading…
Reference in New Issue
Block a user