24 lines
910 B
YAML
24 lines
910 B
YAML
---
|
|
# vars file for ansible-consul
|
|
_consul_lan_servers: "\
|
|
{% set __consul_lan_servers = [] %}\
|
|
{% for server in consul_servers_list %}\
|
|
{% set _consul_datacenter = hostvars[server]['consul_datacenter'] | default('dc1', true) %}\
|
|
{% if _consul_datacenter == consul_datacenter %}\
|
|
{% if __consul_lan_servers.append(server) %}{% endif %}\
|
|
{% endif %}\
|
|
{% endfor %}\
|
|
{{ __consul_lan_servers }}"
|
|
_consul_lan_servercount: "{{ (_consul_lan_servers | length) }}"
|
|
|
|
_consul_wan_servers: "\
|
|
{% set __consul_wan_servers = [] %}\
|
|
{% for server in consul_servers_list %}\
|
|
{% set _consul_datacenter = hostvars[server]['consul_datacenter'] | default('dc1', true) %}\
|
|
{% if _consul_datacenter != consul_datacenter %}\
|
|
{% if __consul_wan_servers.append(server) %}{% endif %}\
|
|
{% endif %}\
|
|
{% endfor %}\
|
|
{{ __consul_wan_servers }}"
|
|
_consul_wan_servercount: "{{ (_consul_wan_servers | length) }}"
|