mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 21:49:30 -02:30
* project: fix var-spacing ansible rule Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing on the beginning/end of jinja template Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing of default filter Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix spacing between filter arguments Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix double space at beginning/end of jinja Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: fix remaining jinja[spacing] ansible-lint warning Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
21 lines
768 B
YAML
21 lines
768 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].access_ip | default(hostvars[host].ip | default(hostvars[host].ansible_default_ipv4['address'])) }}:2379,
|
|
{%- endif -%}
|
|
{%- if loop.last -%}
|
|
https://{{ hostvars[host].access_ip | default(hostvars[host].ip | default(hostvars[host].ansible_default_ipv4['address'])) }}:2379
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
|
|
- name: Update apiserver etcd-servers list
|
|
replace:
|
|
path: /etc/kubernetes/manifests/kube-apiserver.yaml
|
|
regexp: "(etcd-servers=).*"
|
|
replace: "\\1{{ etcd_servers }}"
|