homelab/ansible/reset.yml
2025-02-04 15:48:36 -08:00

26 lines
688 B
YAML

---
- name: Reset k3s cluster
hosts: k3s_cluster
gather_facts: true
roles:
- role: techno_tim.k3s_ansible.reset
become: true
- role: techno_tim.k3s_ansible.raspberrypi
become: true
vars: { state: absent }
post_tasks:
- name: Reboot and wait for node to come back up
become: true
ansible.builtin.reboot:
reboot_command: "{{ custom_reboot_command | default(omit) }}"
reboot_timeout: 3600
- name: Revert changes to Proxmox cluster
hosts: proxmox
gather_facts: true
become: true
remote_user: "{{ proxmox_lxc_ssh_user }}"
roles:
- role: techno_tim.k3s_ansible.reset_proxmox_lxc
when: proxmox_lxc_configure