kubeasz/roles/clean/tasks/clean_etcd.yml

18 lines
413 B
YAML
Raw Normal View History

2019-06-02 00:04:33 +08:00
# to clean 'etcd' nodes
- block:
- name: stop and disable etcd service
service:
name: etcd
state: stopped
enabled: no
ignore_errors: true
- name: remove files and dirs
file: name={{ item }} state=absent
with_items:
2021-06-24 21:57:33 +08:00
- {{ ETCD_DATA_DIR }}
- {{ ETCD_WAL_DIR }}
2019-06-02 00:04:33 +08:00
- "/backup/k8s"
- "/etc/systemd/system/etcd.service"
when: "inventory_hostname in groups['etcd']"