kubeasz/roles/clean/tasks/clean_etcd.yml

19 lines
424 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:
- "/var/lib/etcd"
- "/etc/etcd/"
- "/backup/k8s"
- "/etc/systemd/system/etcd.service"
- "{{ ca_dir }}"
when: "inventory_hostname in groups['etcd']"