homelab/ansible/playbooks/setup-k3s.yaml

27 lines
695 B
YAML

---
# Run: ansible-playbook ansible/playbooks/setup-k3s.yaml -K
#
# What this does:
# - Installs K3s in server mode (with Traefik disabled)
# - Installs Helm
# - Fetches kubeconfig to ~/.kube/config on your workstation
# - Labels the node as node-role=primary
#
# After this playbook:
# kubectl get nodes # should show minisforum as Ready
#
# Then deploy Traefik:
# helm repo add traefik https://helm.traefik.io/traefik
# helm repo update
# helm upgrade --install traefik traefik/traefik \
# --namespace traefik --create-namespace \
# -f values/traefik.yaml
- name: Install K3s server
hosts: minisforum
become: true
gather_facts: true
roles:
- k3s-server