From 3c0f5554a927fb3f56442f0d815d502cbaadab06 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 30 May 2023 17:19:58 -0400 Subject: [PATCH] fix: speed up nuke playbook by preventing k3s from starting on next reboot --- ansible/playbooks/cluster-nuke.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ansible/playbooks/cluster-nuke.yml b/ansible/playbooks/cluster-nuke.yml index 4149f46a..86766f4e 100644 --- a/ansible/playbooks/cluster-nuke.yml +++ b/ansible/playbooks/cluster-nuke.yml @@ -23,11 +23,19 @@ seconds: 5 tasks: - name: Uninstall Cilium + when: + - k3s_control_node is defined + - k3s_control_node ansible.builtin.shell: | cilium uninstall --wait environment: KUBECONFIG: /etc/rancher/k3s/k3s.yaml + - name: Prevent k3s from starting on reboot + ansible.builtin.systemd: + name: k3s + enabled: false + - name: Reboot ansible.builtin.reboot: msg: Rebooting nodes