forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
92.stop.yml
45 lines (39 loc) · 1.09 KB
/
92.stop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
- hosts: kube-master
tasks:
- name: stopping kube-master services
service: name={{ item }} state=stopped enabled=no
with_items:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- hosts: etcd
tasks:
- name: stopping etcd cluster
service: name=etcd state=stopped enabled=no
- hosts: ex-lb
tasks:
- name: stopping external loadbalance
service: name={{ item }} state=stopped enabled=no
with_items:
- haproxy
- keepalived
- hosts:
- kube-master
- kube-node
tasks:
- name: stopping haproxy on kube-node
service: name=haproxy state=stopped enabled=no
when:
- "inventory_hostname not in groups['kube-master']"
- "groups['kube-master']|length > 1"
- name: stopping kube-node services
service: name={{ item }} state=stopped enabled=no
with_items:
- kubelet
- kube-proxy
- name: stopping docker
service: name=docker state=stopped enabled=no
when: "CONTAINER_RUNTIME == 'docker'"
- name: stopping containerd
service: name=containerd state=stopped enabled=no
when: "CONTAINER_RUNTIME == 'containerd'"