ワンクリックで
ansible
Ansible playbook structure, tags, topology rules, branch switching, and operational foot-guns for the K3s cluster.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Ansible playbook structure, tags, topology rules, branch switching, and operational foot-guns for the K3s cluster.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
ArgoCD operations on the K3s cluster — branch repointing via ansible, OCI Helm chart wiring foot-guns (oci:// prefix breaks chart-name resolution), and the InvalidSpecError cache bounce.
Architecture decisions and historical reversals for this repo's bwrap-based Claude sandbox. Covers real claude off PATH, container-scoped PATs, Ubuntu-24.04 CI bwrap workarounds, dogfood ≈ guest, the `just promote` three-layer model (no JSONC editing), and two walked-back paths (Python orchestration; embedding in python-copier-template). Surface before edits to `.devcontainer/claude-sandbox/{claude-shadow,install.sh,promote.sh}`, `install`, `tests/`, `.github/workflows/ci.yml`, or `.claude/commands/verify-sandbox.md`; or before any suggestion to re-introduce Python tooling, embed in python-copier-template, persist gh/glab PATs across containers, or auto-edit JSONC devcontainer.json.
Cloudflare Tunnel and Access configuration for exposing K3s services externally.
OAuth2-proxy authentication setup, configuration, and troubleshooting for the K3s cluster.
RKLLama (RK3588 NPU LLM server) operations — pod CLI quirks, model layout, hardware pinning, and the silent-failure modes of `rkllama_client pull`.
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
SOC 職業分類に基づく
| name | ansible |
| description | Ansible playbook structure, tags, topology rules, branch switching, and operational foot-guns for the K3s cluster. |
pb_all.yml (NOT site.yml)pb_decommission.ymlgroup_vars/all.yml — single source of truth for cluster-wide settingshosts.ymlkubernetes-services/templates/; extra manifests in
kubernetes-services/additions/. Reusable ingress sub-chart at
kubernetes-services/additions/ingress/.ssh ansible@<node> (not root).servers — system packages, workstation taint/label tasks, NVIDIA
container runtime on GPU nodes. Not update_packages — that
tag silently does nothing.cluster — ArgoCD root app + all child apps (branch switching,
service toggles). Sanctioned path for touching ArgoCD-managed state.k3s — K3s install/configure.known_hosts — populate /etc/ssh/ssh_known_hosts.SSH_AUTH_SOCK is set
automatically). Make sure your ansible key is loaded into the host
agent before opening the container; the sandbox running Claude
cannot see it, but ordinary devcontainer terminals can.uv run — pre-commit hooks live in the uv venv./add-node./bootstrap-cluster./rebuild-cluster.repo_branch in group_vars/all.yml must always be main — never
edit it. To point the cluster at a feature branch, use
just switch-branch <branch>, which passes -e repo_branch=<branch>
as an override. Revert with just switch-branch main.
The cluster may already be on a feature branch (e.g. mid-validation of
an open PR), not main. Branching new work off origin/main then
running just switch-branch <new-branch> will silently roll back any
commits that exist only on the previously-tracked branch. The most
painful case is sealed secrets re-sealed during a rebuild: the new
branch applies older (un-decryptable) versions from main, the
controller logs no key could decrypt secret, and consumer pods drift
from their live Secrets.
Before creating a new working branch:
kubectl -n argo-cd get application all-cluster-services \
-o jsonpath='{.spec.sources[*].targetRevision}'
If it's not main, stop and ask the user whether to:
(a) merge the tracked branch to main first, then branch off main, or
(b) base the new work on the currently-tracked branch.
K3s and flannel auto-detect the IP from the default route, which may be
the wrong subnet. Set node_ip and flannel_iface in hosts.yml for
any node with multiple NICs — otherwise CNI traffic goes out the wrong
interface and pod networking silently breaks.
NoSchedule taintThe control plane (e.g. node01) is tainted NoSchedule. DaemonSets
without a matching toleration won't schedule there, so it can safely
be skipped when running --tags servers for node-level drivers (DRA
plugins, etc.).
Workstation nodes carry workstation=true:NoSchedule because they may
reboot unexpectedly. This has three consequences you must design for:
nvidia-device-plugin template already does; audit any new DaemonSet
that needs to run there.nodeAffinity
rule excluding ws03. Otherwise their Longhorn PVCs get provisioned
on ws03 and fail to attach.nodeSelector: kubernetes.io/arch: amd64 pins to nuc2 without any
explicit hostname selector. Useful for charts whose schema forbids
kubernetes.io/hostname overrides (e.g. thoth).Replica counts in kubernetes-services/values.yaml must match the
number of Longhorn-capable nodes (i.e. excluding ws03). Going too high
leaves volumes permanently Degraded; going too low under-replicates on
adds. Update after any /add-node run.
When a node is NotReady and SSH times out, ansible -m reboot and the
graceful procedures in docs/how-to/node-operations.md cannot help —
both the kubelet and sshd on the node are gone. Power-cycle via the
Turing Pi BMC instead.
The BMC is reachable as {{ tpi_user }}@turingpi (default root@turingpi,
defined in group_vars/all.yml). Each slot maps to a node via
slot_num in hosts.yml: node01→1, node02→2, node03→3, node04→4.
nuc2 and ws03 are not on the BMC.
# What the BMC thinks of all four slots
ssh root@turingpi 'tpi power status'
# Power-cycle a single node (off → wait → on) — the form used by roles/flash
ssh root@turingpi 'tpi power off -n 4 && sleep 15 && tpi power on -n 4'
Notes:
kubectl drain first — the node is unreachable, so the
drain will just hang. Just power-cycle and let workloads reschedule
(or come back, for DaemonSets pinned to that node like rkllama).--clearenv bwrap wrapper strips SSH_AUTH_SOCK
and the BMC host key isn't in the sandbox's known_hosts). The !
prompt prefix runs inside the same sandbox, so it doesn't help — ask
the user to run ssh root@turingpi 'tpi power ...' from a regular
devcontainer terminal or the host shell.known_hosts task must run serial: 1 — parallel writes cause
race conditions on the shared file.--disable=traefik with NGINX Ingress. Do
not assume Traefik CRDs exist.k8s module merges annotations — it never removes
annotations that were previously set on an Ingress. If you remove
annotations from a template (e.g. ssl-passthrough), you must
kubectl delete the old Ingress first, then re-run the playbook to
recreate it cleanly.valuesObject overrides values.yaml — for child apps
like open-brain-mcp, the image tag is set in templates/*.yaml
under valuesObject, not in additions/*/values.yaml. Editing
values.yaml alone has no effect — check the template first.admin_emails is duplicated — must be kept in sync between
kubernetes-services/values.yaml (Helm) and group_vars/all.yml
(Ansible). After changing the Ansible copy, re-run --tags cluster.kube-prometheus-stack's
TLS secret (grafana-prometheus-kube-pr-admission) is not created by
the Helm hook job under ArgoCD. The cluster role creates it via
scripts/create-prometheus-admission-secret. If the operator is
still CrashLooping after a rebuild, run
just create-prometheus-admission-secret directly then delete the
stuck pod.gh pr edit fails on this repo — classic projects warning
causes a GraphQL error. Use
gh api repos/OWNER/REPO/pulls/N -X PATCH -f body=... instead.pb_all.yml — main playbookpb_decommission.yml — teardowngroup_vars/all.yml — all variableshosts.yml — inventory with node varsroles/ — Ansible roles