correct wan join

This commit is contained in:
vincent 2022-03-12 11:16:39 +01:00
parent b9786ad344
commit eeffce0bc0

View File

@ -29,13 +29,13 @@ acl {
}
{% for server in _consul_lan_servers %}
{% set _ = consul_join.append(hostvars.server['consul_bind_address'] | default(hostvars[server]['ansible_default_ipv4']['address'],true) | mandatory) %}
{% set _ = consul_join.append(hostvars[server]['consul_bind_address'] | default(hostvars[server]['ansible_default_ipv4']['address'],true) | mandatory) %}
{% endfor %}
retry_join= {{ consul_join | map('ipwrap') | list | to_json }}
{% if _consul_wan_servercount | int > 0 %}
{% for server in _consul_wan_servers %}
{% set _ = consul_join_wan.append(hostvars[server]['consul_bind_address']) %}
{% set _ = consul_join_wan.append(hostvars[server]['consul_bind_address']|default(hostvars[server]['ansible_default_ipv4']['address'],true) | mandatory) %}
{% endfor %}
retry_join_wan= {{ consul_join_wan | map('ipwrap') | list | to_json }}
{% endif %}