kubeasz/roles/clean/tasks/clean_master.yml

20 lines
647 B
YAML
Raw Normal View History

# to clean 'kube_master' nodes
- name: stop and disable kube_master service
2019-06-02 00:04:33 +08:00
service: name={{ item }} state=stopped enabled=no
with_items:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
ignore_errors: true
when: "inventory_hostname in groups['kube_master']"
2019-06-02 00:04:33 +08:00
- name: remove files and dirs of 'kube_master' nodes
2019-06-02 00:04:33 +08:00
file: name={{ item }} state=absent
with_items:
- "/var/run/kubernetes"
- "/etc/systemd/system/kube-apiserver.service"
- "/etc/systemd/system/kube-controller-manager.service"
- "/etc/systemd/system/kube-scheduler.service"
2022-10-31 20:15:44 +08:00
ignore_errors: true
when: "inventory_hostname in groups['kube_master']"