2020-03-25 20:36:28 +01:00
|
|
|
---
|
|
|
|
- name: Disable services
|
|
|
|
systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: stopped
|
|
|
|
enabled: no
|
2020-07-22 18:43:06 +02:00
|
|
|
failed_when: False
|
2020-03-25 20:36:28 +01:00
|
|
|
with_items:
|
|
|
|
- k3s
|
|
|
|
- k3s-node
|
|
|
|
|
2020-07-22 18:43:06 +02:00
|
|
|
- name: Killall containerd-shim-runc-v2
|
|
|
|
command: killall -9 containerd-shim-runc-v2
|
|
|
|
failed_when: False
|
|
|
|
changed_when: False
|
|
|
|
|
|
|
|
- name: Umount k3s filesystems
|
|
|
|
include_tasks: umount_with_childeren.yml
|
|
|
|
with_items:
|
|
|
|
- /run/k3s
|
|
|
|
- /var/lib/kubelet
|
|
|
|
- /run/netns
|
|
|
|
- /var/lib/rancher/k3s
|
|
|
|
loop_control:
|
|
|
|
loop_var: mounted_fs
|
|
|
|
|
2020-03-25 20:36:28 +01:00
|
|
|
- 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
|