kubeasz/roles/clean/tasks/clean_etcd.yml

19 lines
439 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-09-05 10:13:23 +08:00
- "{{ ETCD_DATA_DIR }}"
- "{{ ETCD_WAL_DIR }}"
2019-06-02 00:04:33 +08:00
- "/backup/k8s"
- "/etc/systemd/system/etcd.service"
2022-10-31 20:15:44 +08:00
ignore_errors: true
2019-06-02 00:04:33 +08:00
when: "inventory_hostname in groups['etcd']"