2015-10-03 20:19:50 +00:00
|
|
|
---
|
2016-08-01 13:12:23 +00:00
|
|
|
- name: Master | restart kubelet
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2016-08-25 09:16:14 +00:00
|
|
|
- Master | reload systemd
|
|
|
|
- Master | reload kubelet
|
2016-09-27 09:54:12 +00:00
|
|
|
- Master | wait for master static pods
|
2016-08-01 13:12:23 +00:00
|
|
|
|
2016-09-27 09:54:12 +00:00
|
|
|
- name: Master | wait for master static pods
|
2016-08-01 13:12:23 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
2016-09-27 09:54:12 +00:00
|
|
|
- Master | wait for the apiserver to be running
|
|
|
|
- Master | wait for kube-scheduler
|
|
|
|
- Master | wait for kube-controller-manager
|
2016-08-01 13:12:23 +00:00
|
|
|
|
2017-11-08 07:40:33 +00:00
|
|
|
- name: Master | Restart apiserver
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Master | Remove apiserver container
|
|
|
|
- Master | wait for the apiserver to be running
|
|
|
|
|
|
|
|
- name: Master | Restart kube-scheduler
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Master | Remove scheduler container
|
|
|
|
- Master | wait for kube-scheduler
|
|
|
|
|
|
|
|
- name: Master | Restart kube-controller-manager
|
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Master | Remove controller manager container
|
|
|
|
- Master | wait for kube-controller-manager
|
|
|
|
|
2016-08-01 13:12:23 +00:00
|
|
|
- name: Master | reload systemd
|
|
|
|
command: systemctl daemon-reload
|
|
|
|
|
|
|
|
- name: Master | reload kubelet
|
|
|
|
service:
|
|
|
|
name: kubelet
|
|
|
|
state: restarted
|
|
|
|
|
2017-11-08 07:40:33 +00:00
|
|
|
- name: Master | Remove apiserver container
|
|
|
|
shell: "docker ps -af name=k8s_kube-apiserver* -q | xargs --no-run-if-empty docker rm -f"
|
2017-12-12 18:06:41 +00:00
|
|
|
register: remove_apiserver_container
|
|
|
|
retries: 4
|
|
|
|
until: remove_apiserver_container.rc == 0
|
|
|
|
delay: 5
|
2017-11-08 07:40:33 +00:00
|
|
|
|
|
|
|
- name: Master | Remove scheduler container
|
|
|
|
shell: "docker ps -af name=k8s_kube-scheduler* -q | xargs --no-run-if-empty docker rm -f"
|
2017-12-12 18:06:41 +00:00
|
|
|
register: remove_scheduler_container
|
|
|
|
retries: 4
|
|
|
|
until: remove_scheduler_container.rc == 0
|
|
|
|
delay: 5
|
2017-11-08 07:40:33 +00:00
|
|
|
|
|
|
|
- name: Master | Remove controller manager container
|
|
|
|
shell: "docker ps -af name=k8s_kube-controller-manager* -q | xargs --no-run-if-empty docker rm -f"
|
2017-12-12 18:06:41 +00:00
|
|
|
register: remove_cm_container
|
|
|
|
retries: 4
|
|
|
|
until: remove_cm_container.rc == 0
|
|
|
|
delay: 5
|
2017-11-08 07:40:33 +00:00
|
|
|
|
2016-09-27 09:54:12 +00:00
|
|
|
- name: Master | wait for kube-scheduler
|
2017-02-17 21:22:34 +00:00
|
|
|
uri:
|
|
|
|
url: http://localhost:10251/healthz
|
2016-08-01 13:12:23 +00:00
|
|
|
register: scheduler_result
|
|
|
|
until: scheduler_result.status == 200
|
2017-03-27 11:44:21 +00:00
|
|
|
retries: 60
|
2016-08-01 13:12:23 +00:00
|
|
|
delay: 5
|
|
|
|
|
2016-09-27 09:54:12 +00:00
|
|
|
- name: Master | wait for kube-controller-manager
|
2017-02-17 21:22:34 +00:00
|
|
|
uri:
|
|
|
|
url: http://localhost:10252/healthz
|
2016-08-01 13:12:23 +00:00
|
|
|
register: controller_manager_result
|
|
|
|
until: controller_manager_result.status == 200
|
|
|
|
retries: 15
|
|
|
|
delay: 5
|
2016-09-27 09:54:12 +00:00
|
|
|
|
|
|
|
- name: Master | wait for the apiserver to be running
|
2017-02-17 21:22:34 +00:00
|
|
|
uri:
|
2017-11-14 13:41:28 +00:00
|
|
|
url: "{{ kube_apiserver_insecure_endpoint }}/healthz"
|
2016-09-27 09:54:12 +00:00
|
|
|
register: result
|
|
|
|
until: result.status == 200
|
2017-03-30 13:08:13 +00:00
|
|
|
retries: 20
|
2016-09-27 09:54:12 +00:00
|
|
|
delay: 6
|
2017-09-13 18:00:51 +00:00
|
|
|
|
|
|
|
- name: Master | set secret_changed
|
2017-10-12 08:55:46 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Master | set secret_changed to true
|
|
|
|
- Master | clear kubeconfig for root user
|
|
|
|
|
|
|
|
- name: Master | set secret_changed to true
|
2017-09-13 18:00:51 +00:00
|
|
|
set_fact:
|
|
|
|
secret_changed: true
|
2017-10-12 08:55:46 +00:00
|
|
|
|
|
|
|
- name: Master | clear kubeconfig for root user
|
|
|
|
file:
|
|
|
|
path: /root/.kube/config
|
|
|
|
state: absent
|