--- # defaults file for ansible-consul consul_server: True consul_ui: True consul_iface: "{{ ansible_default_ipv4.interface }}" consul_bind_address: "{{ hostvars[inventory_hostname]['ansible_'+ consul_iface | replace('-', '_')]['ipv4']['address']}}" consul_client_addr: "127.0.0.1" consul_bootstrap: False consul_data_dir: "/opt/consul" consul_datacenter: "dc1" consul_gossip_encryption_key: consul_ansible_group: "consul" consul_servers_list: "\ {% set _consul_servers_list = [] %}\ {% for host in groups[consul_ansible_group] %}\ {% set _consul_server = hostvars[host]['consul_server']|default(true,true) %}\ {% if ( _consul_server == True) %}\ {% if _consul_servers_list.append(host) %}{% endif %}\ {% endif %}\ {% endfor %}\ {{ _consul_servers_list }}" consul_join: [] consul_join_wan: [] consul_bootstrap_expect: 3