mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-09 15:02:08 -03:30
21 lines
656 B
YAML
21 lines
656 B
YAML
---
|
|
# 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 }}"
|