Turborepo + pnpm monorepo for k3s homelab cluster on Intel NUCs. - Apps: Next.js web frontend, Express API (TypeScript, Dockerfiles, k8s manifests) - Packages: shared UI, ESLint config, TypeScript config, Drizzle DB schemas - Infra/Ansible: bare-metal provisioning with roles for common, k3s-server, k3s-agent, hardening - Infra/Kubernetes: ArgoCD GitOps (app-of-apps + ApplicationSets), platform components (cert-manager, Traefik, CloudNativePG, Valkey, Longhorn, Sealed Secrets), namespaces - Observability: kube-prometheus-stack, Loki, Promtail as ArgoCD Applications - CI/CD: GitHub Actions for PR builds, preview deploys, production deploys - DX: Taskfile, utility scripts, copier templates, Ubiquiti network docs
39 lines
989 B
YAML
39 lines
989 B
YAML
---
|
|
- name: Reset k3s cluster (DESTRUCTIVE)
|
|
hosts: k3s_cluster
|
|
become: true
|
|
tasks:
|
|
- name: Confirm reset
|
|
ansible.builtin.pause:
|
|
prompt: "This will DESTROY the k3s cluster. Type 'yes' to continue"
|
|
register: confirm
|
|
run_once: true
|
|
|
|
- name: Abort if not confirmed
|
|
ansible.builtin.fail:
|
|
msg: "Reset aborted"
|
|
when: confirm.user_input != "yes"
|
|
run_once: true
|
|
|
|
- name: Uninstall k3s agent
|
|
ansible.builtin.command:
|
|
cmd: /usr/local/bin/k3s-agent-uninstall.sh
|
|
when: k3s_role == 'agent'
|
|
ignore_errors: true
|
|
changed_when: true
|
|
|
|
- name: Uninstall k3s server
|
|
ansible.builtin.command:
|
|
cmd: /usr/local/bin/k3s-uninstall.sh
|
|
when: k3s_role == 'server'
|
|
ignore_errors: true
|
|
changed_when: true
|
|
|
|
- name: Clean up data directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: absent
|
|
loop:
|
|
- /var/lib/rancher
|
|
- /etc/rancher
|