kubernetesbare-metalk8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
656 B
20 lines
656 B
---
|
|
# TODO: Figure out why kubeadm does not fix this
|
|
- name: Set etcd-servers fact
|
|
set_fact:
|
|
# noqa: jinja[spacing]
|
|
etcd_servers: >-
|
|
{% for host in groups['etcd'] -%}
|
|
{% if not loop.last -%}
|
|
https://{{ hostvars[host]['main_access_ip'] | ansible.utils.ipwrap }}:2379,
|
|
{%- endif -%}
|
|
{%- if loop.last -%}
|
|
https://{{ hostvars[host]['main_access_ip'] | ansible.utils.ipwrap }}:2379
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
|
|
- name: Update apiserver etcd-servers list
|
|
replace:
|
|
path: /etc/kubernetes/manifests/kube-apiserver.yaml
|
|
regexp: "(etcd-servers=).*"
|
|
replace: "\\1{{ etcd_servers }}"
|