diff options
author | Andrew Butcher <abutcher@redhat.com> | 2016-04-20 12:20:12 -0400 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-04-20 12:42:48 -0400 |
commit | 43fa4eff62f2497e3ac4dc589e657fbf15dd40ab (patch) | |
tree | 243f7d83aa92508a2212830133ff1af6c49ae6b4 /roles/etcd/templates/etcd.conf.j2 | |
parent | 1f490c2374038669df3d2bfcb01af54361f8907e (diff) | |
download | openshift-43fa4eff62f2497e3ac4dc589e657fbf15dd40ab.tar.gz openshift-43fa4eff62f2497e3ac4dc589e657fbf15dd40ab.tar.bz2 openshift-43fa4eff62f2497e3ac4dc589e657fbf15dd40ab.tar.xz openshift-43fa4eff62f2497e3ac4dc589e657fbf15dd40ab.zip |
Use openshift_hostname/openshift_ip values for etcd configuration and certificates.
Diffstat (limited to 'roles/etcd/templates/etcd.conf.j2')
-rw-r--r-- | roles/etcd/templates/etcd.conf.j2 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2 index 28816fd87..cd048ec60 100644 --- a/roles/etcd/templates/etcd.conf.j2 +++ b/roles/etcd/templates/etcd.conf.j2 @@ -1,15 +1,15 @@ {% macro initial_cluster() -%} -{% for host in groups[etcd_peers_group] -%} +{% for host in etcd_peers -%} {% if loop.last -%} -{{ host }}={{ etcd_peer_url_scheme }}://{{ etcd_host_int_map[host].interface.ipv4.address }}:{{ etcd_peer_port }} +{{ hostvars[host].etcd_hostname }}={{ etcd_peer_url_scheme }}://{{ hostvars[host].etcd_ip }}:{{ etcd_peer_port }} {%- else -%} -{{ host }}={{ etcd_peer_url_scheme }}://{{ etcd_host_int_map[host].interface.ipv4.address }}:{{ etcd_peer_port }}, +{{ hostvars[host].etcd_hostname }}={{ etcd_peer_url_scheme }}://{{ hostvars[host].etcd_ip }}:{{ etcd_peer_port }}, {%- endif -%} {% endfor -%} {% endmacro -%} -{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %} -ETCD_NAME={{ inventory_hostname }} +{% if etcd_peers | default([]) | length > 1 %} +ETCD_NAME={{ etcd_hostname }} ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }} {% else %} ETCD_NAME=default @@ -23,7 +23,7 @@ ETCD_LISTEN_CLIENT_URLS={{ etcd_listen_client_urls }} #ETCD_MAX_WALS=5 #ETCD_CORS= -{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %} +{% if etcd_peers | default([]) | length > 1 %} #[cluster] ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }} ETCD_INITIAL_CLUSTER={{ initial_cluster() }} |