summaryrefslogtreecommitdiffstats
path: root/roles/etcd/templates
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-10-16 11:28:42 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-11-02 21:57:43 -0500
commit02a6d993509ac395165c504dba7b92c4f2eb907c (patch)
tree0ad5c437407025500cf7aef56386e8005dcda6cd /roles/etcd/templates
parentfcbb48362afb6e9ed196d7833940877bbc0296ae (diff)
downloadopenshift-02a6d993509ac395165c504dba7b92c4f2eb907c.tar.gz
openshift-02a6d993509ac395165c504dba7b92c4f2eb907c.tar.bz2
openshift-02a6d993509ac395165c504dba7b92c4f2eb907c.tar.xz
openshift-02a6d993509ac395165c504dba7b92c4f2eb907c.zip
Fix etcd cert generation when etcd_interface is defined
- Refactor certificate generation to properly accept overrides of etcd_interface per host and set the certificate SANS and peer URLs properly. - Add sanity checking to user-set values of etcd_interface to provide a better error message
Diffstat (limited to 'roles/etcd/templates')
-rw-r--r--roles/etcd/templates/etcd.conf.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2
index 9ac23b1dd..32577c96c 100644
--- a/roles/etcd/templates/etcd.conf.j2
+++ b/roles/etcd/templates/etcd.conf.j2
@@ -1,9 +1,9 @@
{% macro initial_cluster() -%}
{% for host in groups[etcd_peers_group] -%}
{% if loop.last -%}
-{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}
+{{ host }}={{ etcd_peer_url_scheme }}://{{ etcd_host_int_map[host].interface.ipv4.address }}:{{ etcd_peer_port }}
{%- else -%}
-{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }},
+{{ host }}={{ etcd_peer_url_scheme }}://{{ etcd_host_int_map[host].interface.ipv4.address }}:{{ etcd_peer_port }},
{%- endif -%}
{% endfor -%}
{% endmacro -%}