OpenTofu libvirt module (k3s-dev NAT 10.73.0.0/24, 3x 6GiB/4vCPU VMs, 20G OS +
40G thin data, host-passthrough), cloud-init baseline (k3s/Cilium/Longhorn
prereqs, static net), Ansible k3s-HA + Cilium (kube-proxy replacement, Gateway
API, Hubble; flannel/kube-proxy/Traefik disabled). PM fix: escape ${...} in a
cloud-init template comment (tofu templatefile parse). tofu fmt/init/validate =
Success; ansible --syntax-check + yamllint pass. NOTHING executed (no apply).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
23 lines
561 B
YAML
23 lines
561 B
YAML
---
|
|
# Install the HA k3s control plane (embedded etcd, 3 servers) — ADR-0001.
|
|
# Primary founds the cluster (--cluster-init); secondaries join it in a second
|
|
# play so the primary's node-token fact is available to them.
|
|
|
|
- name: k3s primary (cluster-init)
|
|
hosts: k3s_primary
|
|
become: true
|
|
gather_facts: true
|
|
roles:
|
|
- role: k3s_server
|
|
vars:
|
|
k3s_server_mode: primary
|
|
|
|
- name: k3s secondaries (join)
|
|
hosts: k3s_secondary
|
|
become: true
|
|
gather_facts: true
|
|
roles:
|
|
- role: k3s_server
|
|
vars:
|
|
k3s_server_mode: secondary
|