blob: 9c9c764135610dd92039d1ba4707874553280909 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
---
{% 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 %}
|