mirror of https://github.com/easzlab/kubeasz.git
19 lines
439 B
YAML
19 lines
439 B
YAML
# 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:
|
|
- "{{ ETCD_DATA_DIR }}"
|
|
- "{{ ETCD_WAL_DIR }}"
|
|
- "/backup/k8s"
|
|
- "/etc/systemd/system/etcd.service"
|
|
ignore_errors: true
|
|
when: "inventory_hostname in groups['etcd']"
|