Add Alpine reset configuration

This commit is contained in:
Jiayi Hu
2020-12-28 15:58:16 +01:00
parent d22ad01d50
commit ec953544c4
5 changed files with 79 additions and 44 deletions

View File

@@ -0,0 +1,28 @@
---
- name: Disable services
service:
name: k3s
state: stopped
enabled: no
- name: Umount k3s filesystems
include_tasks: umount_with_children.yml
with_items:
- /run/k3s
- /var/lib/kubelet
- /run/netns
- /var/lib/rancher/k3s
loop_control:
loop_var: mounted_fs
- name: Remove service files, binaries and data
file:
name: "{{ item }}"
state: absent
with_items:
- /etc/init.d/k3s
- /etc/runlevels/default/k3s
- /etc/rancher/k3s
- /var/lib/rancher/k3s
- /var/lib/kubelet
- /usr/local/bin/k3s