2019-09-10 01:33:20 +08:00
|
|
|
---
|
2019-09-13 18:40:29 +08:00
|
|
|
|
2021-03-04 01:39:20 +08:00
|
|
|
- name: Update server field in component kubeconfigs
|
|
|
|
lineinfile:
|
2019-09-13 18:40:29 +08:00
|
|
|
dest: "{{ kube_config_dir }}/{{ item }}"
|
2021-03-04 01:39:20 +08:00
|
|
|
regexp: '^ server: https'
|
|
|
|
line: ' server: {{ kube_apiserver_endpoint }}'
|
|
|
|
backup: yes
|
2019-09-10 01:33:20 +08:00
|
|
|
with_items:
|
2019-09-13 18:40:29 +08:00
|
|
|
- admin.conf
|
|
|
|
- controller-manager.conf
|
|
|
|
- kubelet.conf
|
|
|
|
- scheduler.conf
|
|
|
|
notify:
|
|
|
|
- "Master | Restart kube-controller-manager"
|
|
|
|
- "Master | Restart kube-scheduler"
|
|
|
|
- "Master | reload kubelet"
|
2021-12-03 16:28:27 +08:00
|
|
|
|
|
|
|
- name: Update etcd-servers for apiserver
|
|
|
|
lineinfile:
|
|
|
|
dest: "{{ kube_config_dir }}/manifests/kube-apiserver.yaml"
|
|
|
|
regexp: '^ - --etcd-servers='
|
|
|
|
line: ' - --etcd-servers={{ etcd_access_addresses }}'
|
|
|
|
when: not etcd_kubeadm_enabled | default(false)
|