mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-12-02 13:25:00 +01:00
75fd17aac8
1. Now does not remove prerequisite packages, lvm2 was included in these packages (not good when you use LVM2 for real). 2. Added a bit more idempotency to the shell scripts - only delete if it exists. 3. Check that the process isn't running and binaries are gone.
26 lines
1.1 KiB
YAML
26 lines
1.1 KiB
YAML
---
|
|
|
|
- import_tasks: teardown/uninstall-k3s.yml
|
|
|
|
- import_tasks: teardown/uninstall-docker.yml
|
|
when: k3s_use_docker
|
|
and ((k3s_control_workers)
|
|
or (not k3s_control_workers and not k3s_control_node))
|
|
and ansible_distribution | replace(" ", "-") | lower not in ['amazon', 'suse', 'opensuse-leap']
|
|
and (k3s_non_root is not defined or not k3s_non_root)
|
|
|
|
- include_tasks: teardown/uninstall-docker-{{ ansible_distribution | replace(" ", "-") | lower }}.yml
|
|
when: k3s_use_docker
|
|
and ((k3s_control_workers)
|
|
or (not k3s_control_workers and not k3s_control_node))
|
|
and ansible_distribution | replace(" ", "-") | lower in ['amazon', 'suse', 'opensuse-leap']
|
|
and (k3s_non_root is not defined or not k3s_non_root)
|
|
|
|
- include_tasks: teardown/uninstall-docker-prerequisites-{{ ansible_os_family | lower }}.yml
|
|
when: k3s_use_docker
|
|
and ((k3s_control_workers)
|
|
or (not k3s_control_workers and not k3s_control_node))
|
|
and (k3s_non_root is not defined or not k3s_non_root)
|
|
|
|
- import_tasks: validate/check-uninstalled.yml
|