summaryrefslogtreecommitdiffstats
path: root/roles/etcd_common/templates
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-11-04 11:59:28 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-11-04 11:59:28 -0500
commit7869fb8c26a96c1e0ee74b930fd0da8a9952cb52 (patch)
tree37b83c517769c4730b680b602672ba3f9245137a /roles/etcd_common/templates
parenta706860af853be6d8bc77ea38593467e827ed527 (diff)
parentf5e83fc2330d6f784df3859f5305d4b80cc0c469 (diff)
downloadopenshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.gz
openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.bz2
openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.xz
openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.zip
Merge pull request #811 from openshift/master
master to prod
Diffstat (limited to 'roles/etcd_common/templates')
-rw-r--r--roles/etcd_common/templates/host_int_map.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/etcd_common/templates/host_int_map.j2 b/roles/etcd_common/templates/host_int_map.j2
new file mode 100644
index 000000000..9c9c76413
--- /dev/null
+++ b/roles/etcd_common/templates/host_int_map.j2
@@ -0,0 +1,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 %}