diff --git a/contrib/ansible/roles/flannel/templates/flanneld.j2 b/contrib/ansible/roles/flannel/templates/flanneld.j2 index 7345c102168..e24ce895bf2 100644 --- a/contrib/ansible/roles/flannel/templates/flanneld.j2 +++ b/contrib/ansible/roles/flannel/templates/flanneld.j2 @@ -1,7 +1,7 @@ # Flanneld configuration options # etcd url location. Point this to the server where etcd runs -FLANNEL_ETCD="http://{{ groups['etcd'][0] }}:2379" +FLANNEL_ETCD="{% for node in groups['etcd'] %}http://{{ node }}:2379{% if not loop.last %},{% endif %}{% endfor %}" # etcd config key. This is the configuration key that flannel queries # For address range assignment diff --git a/contrib/ansible/roles/master/templates/apiserver.j2 b/contrib/ansible/roles/master/templates/apiserver.j2 index 82114506754..778d2877395 100644 --- a/contrib/ansible/roles/master/templates/apiserver.j2 +++ b/contrib/ansible/roles/master/templates/apiserver.j2 @@ -17,7 +17,7 @@ KUBE_API_ADDRESS="--address=0.0.0.0" KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range={{ kube_service_addresses }}" # Location of the etcd cluster -KUBE_ETCD_SERVERS="--etcd_servers=http://{{ groups['etcd'][0] }}:2379" +KUBE_ETCD_SERVERS="--etcd_servers={% for node in groups['etcd'] %}http://{{ node }}:2379{% if not loop.last %},{% endif %}{% endfor %}" # default admission control policies KUBE_ADMISSION_CONTROL="--admission_control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"