27 lines
612 B
YAML
Executable File
27 lines
612 B
YAML
Executable File
---
|
|
- name: Remove K3s from Raspberries
|
|
hosts: kubernetes
|
|
roles:
|
|
- common
|
|
become: yes
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
|
|
- name: Remove K3s from master nodes
|
|
ansible.builtin.command:
|
|
cmd: sudo sh /usr/local/bin/k3s-uninstall.sh
|
|
when: ('kube_masters' in group_names)
|
|
|
|
- name: Remove K3s from worker nodes
|
|
ansible.builtin.command:
|
|
cmd: sudo sh /usr/local/bin/k3s-agent-uninstall.sh
|
|
when: ('kube_workers' in group_names)
|
|
|
|
- name: Unset installation environment variables
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/environment
|
|
state: absent
|
|
regexp: 'K3S'
|
|
|