k3s/contrib/ansible/roles/reset/tasks/main.yml
Julien DOCHE 3c98290f0b
contrib/ansible: Add reset role and playbook to reset a node (#1565)
Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2020-03-25 12:36:28 -07:00

26 lines
485 B
YAML

---
- name: Disable services
systemd:
name: "{{ item }}"
state: stopped
enabled: no
with_items:
- k3s
- k3s-node
- name: Remove service files, binaries and data
file:
name: "{{ item }}"
state: absent
with_items:
- "{{ systemd_dir }}/k3s.service"
- "{{ systemd_dir }}/k3s-node.service"
- /etc/rancher/k3s
- /var/lib/rancher/k3s
- /var/lib/kubelet
- /usr/local/bin/k3s
- name: daemon_reload
systemd:
daemon_reload: yes