2019-09-09 17:33:20 +00:00
|
|
|
---
|
2019-09-13 10:40:29 +00:00
|
|
|
|
2021-03-03 17:39:20 +00:00
|
|
|
- name: Update server field in component kubeconfigs
|
|
|
|
lineinfile:
|
2019-09-13 10:40:29 +00:00
|
|
|
dest: "{{ kube_config_dir }}/{{ item }}"
|
2021-03-03 17:39:20 +00:00
|
|
|
regexp: '^ server: https'
|
|
|
|
line: ' server: {{ kube_apiserver_endpoint }}'
|
|
|
|
backup: yes
|
2019-09-09 17:33:20 +00:00
|
|
|
with_items:
|
2019-09-13 10:40:29 +00: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 08:28:27 +00: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 }}'
|
2022-02-22 16:53:16 +00:00
|
|
|
when: etcd_deployment_type != "kubeadm"
|