- ---
- {% for host in groups[etcd_peers_group] %}
- {% set entry=hostvars[host] %}
- {{ entry.inventory_hostname }}:
- {% if 'etcd_interface' in entry %}
- etcd_interface: {{ entry.etcd_interface }}
- {% if entry.etcd_interface in entry.ansible_interfaces %}
- interface: {{ entry['ansible_' ~ entry.etcd_interface] | to_json }}
- {% endif %}
- {% else %}
- interface: {{ entry['ansible_' ~ entry.ansible_default_ipv4.interface] | to_json }}
- {% endif %}
- {% endfor %}
|