Skip to content

Commit

Permalink
Enable cluster reset
Browse files Browse the repository at this point in the history
Closes #4
  • Loading branch information
edwardtheharris committed Jul 22, 2024
1 parent b053cad commit 9284ef0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
7 changes: 0 additions & 7 deletions roles/kcp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
owner: kube
group: kube
mode: ug+rwx,o+r
- name: Copy reset config
ansible.builtin.copy:
src: reset.yaml
dest: /etc/kubeadm/reset.yaml
owner: kube
group: kube
mode: ugo+rw
- name: Drop init token
ansible.builtin.file:
dest: /etc/kubeadm/init.token
Expand Down
15 changes: 15 additions & 0 deletions roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
###
# ```{rubric} Force reset an existing cluster
# ```
# ---
# Record the output to stdout and a temporary file.
- name: Reset existing cluster
ansible.builtin.command:
chdir: /etc/kubeadm
cmd: kubeadm reset -f &> /root/reset.md
removes: /etc/kubernetes/admin.conf
register: reset_out
- name: Show output
ansible.builtin.debug:
var: reset_out

0 comments on commit 9284ef0

Please sign in to comment.