switch consul to ipv6

This commit is contained in:
Quentin 2020-10-27 22:39:00 +01:00
parent bf9a9128b8
commit 2557793cee

View file

@ -1,14 +1,14 @@
{ {
"data_dir": "/var/lib/consul", "data_dir": "/var/lib/consul",
"bind_addr": "0.0.0.0", "bind_addr": "[::]",
"advertise_addr": "{{ ipv4 }}", "advertise_addr": "{{ ipv6 }}",
"addresses": { "addresses": {
"dns": "0.0.0.0", "dns": "[::]",
"http": "0.0.0.0" "http": "[::]"
}, },
"retry_join": [ "retry_join": [
{% for selected_host in groups['cluster_nodes']|reject("sameas", ansible_fqdn) %}{# @FIXME: Reject doesn't work #} {% for selected_host in groups['cluster_nodes']|reject("sameas", ansible_fqdn) %}{# @FIXME: Reject doesn't work #}
"{{ hostvars[selected_host]['ipv4'] }}" {{ "," if not loop.last else "" }} "{{ hostvars[selected_host]['ipv6'] }}" {{ "," if not loop.last else "" }}
{% endfor %} {% endfor %}
], ],
"bootstrap_expect": 3, "bootstrap_expect": 3,