summaryrefslogtreecommitdiffstats
path: root/roles/etcd_common/templates
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-03 08:29:52 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-03 08:29:52 -0500
commit94c5c1fe5c280054132077dedcc1d0b96558a91f (patch)
tree4cfbf11355dbf2e2631cfe8b9b20937ba4f445da /roles/etcd_common/templates
parenta4d5e59c413746cb1715b15a9e158be3f3a94a54 (diff)
parent02a6d993509ac395165c504dba7b92c4f2eb907c (diff)
downloadopenshift-94c5c1fe5c280054132077dedcc1d0b96558a91f.tar.gz
openshift-94c5c1fe5c280054132077dedcc1d0b96558a91f.tar.bz2
openshift-94c5c1fe5c280054132077dedcc1d0b96558a91f.tar.xz
openshift-94c5c1fe5c280054132077dedcc1d0b96558a91f.zip
Merge pull request #702 from detiber/etcd_cert_fix
Fix etcd cert generation when etcd_interface is defined
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 %}