kubeasz/playbooks/92.stop.yml

41 lines
934 B
YAML
Raw Normal View History

- hosts: kube_master
2019-10-01 22:32:51 +08:00
tasks:
- name: stopping kube_master services
2019-10-01 22:32:51 +08:00
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
2019-10-01 22:32:51 +08:00
tasks:
- name: stopping external loadbalance
service: name={{ item }} state=stopped enabled=no
with_items:
- haproxy
- keepalived
- hosts:
- kube_master
- kube_node
2019-10-01 22:32:51 +08:00
tasks:
- name: stopping kube_node services
2019-10-01 22:32:51 +08:00
service: name={{ item }} state=stopped enabled=no
with_items:
- kube-lb
2019-10-01 22:32:51 +08:00
- 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'"