feat(scripts): generate the bench control inputs

The weekly bench runs without a person. On 2026-11-23 the rig made its control inputs by hand: the lab CA, the vault file and the local vars. This adds scripts/gen_bench_inputs.py, which makes them for one run. This is node N5 of the bench plan. No CI job calls it yet.

flowchart LR
  A[inventory or --zone] --> S[gen_bench_inputs.py]
  B[licence path: checked, never read] --> S
  S --> C[CA and five leaves]
  S --> V[vault.yml 0600]
  S --> L[local.yml 0600]
  C --> T[track2.yml]
  V --> T
  L --> T
  C --> K[lab-sealed-check.yml]
  V --> K
  L --> K

What it does:

  • Writes to the git-ignored .bench-inputs/, or to --out. It refuses a directory in the checkout that Git does not ignore.
  • Reuses scripts/gen_lab_ca.sh (new CERTS_DIR and LAB_HOSTS variables) for the CA and one leaf each for gitlab, openbao, clickhouse, aigw and orbit.
  • Gives every variable of vault.yml.example a random value. The vault stays plain YAML at mode 0600: no playbook needs it encrypted, and the values live for one run. Encrypting would need one more secret.
  • Writes local.yml with the Track 2 switches, orbit_pg_client_cidr, addon_host_address, the certificate paths, lab_seal_dns_hosts and the offline_check track. Pass both files with -e @, which beats the vars.yml defaults.
  • Takes the licence path, checks that the file exists and never opens it. It prints file paths only.
  • addon_wiring gets addon_wiring_certs_dir (default unchanged), because the role read the CA and the OpenBao leaf from a fixed certs/ path.

offline_check_admin_token is not generated here. The GitLab host mints it.

Checklist

  • Verified on a deployment, or the reason it was not: no deployment. scripts/test_gen_bench_inputs.py (13 tests) runs the script, derives the required variables from the role vars and asserts, and runs ansible-playbook --syntax-check of track2.yml and lab-sealed-check.yml with the generated vars. yamllint and ansible-lint pass on the touched role.
  • Runbook and README updated if a step, variable or default changed: AGENTS.md and docs/runbook/tracks/quadlet.md.
  • No secrets, hostnames or account IDs committed; certs stay in the git-ignored certs/.
  • Release and service image pins changed in ansible/group_vars/all/versions.yml: none changed.

Merge request reports

Loading
Loading