chore(ansible): remove the legacy-rename and kanidm-cleanup roles #759

Sammanfogat
supernaut sammanfogade 3 incheckningar från chore/585-purge in i main 2026-10-27 13:14:07 +00:00
Ägare

Title: chore(ansible): remove the legacy-rename and kanidm-cleanup roles

Part of #585.

What

  • Delete the legacy-rename role, its two site.yml entries, scripts/test_legacy_rename.py and its CI step.
  • Delete the kanidm-cleanup role and its site.yml entry.
  • Runbook "Legacy rename": keep the before/after table and a short purge record. Drop the role, window, rehearsal and soft-rollback procedure.
  • Runbook "Kanidm removal": drop the kanidm-cleanup paragraph.
  • Runbook "Move Keycloak to bitborg-id": the shared keycloak database is no longer a rollback copy.
  • Runbook staging "Up" step 2: pin the sshd key for [<ip>]:2222. The bare <ip> entry is only needed for the first apply, which still reaches sshd on port 22. After it, port 22 serves Forgejo's git SSH with its own key, so the step now removes that entry with ssh-keygen -R <ip>.

legacy_user, legacy_restic_host and legacy_secret_prefix stay. The backup readers and the secret cleanup in three roles still use them.

Host purge

The host deletes are one-off and run outside Ansible, staging first, then prod, on 2026-10-26. They remove:

  • Services hosts: /srv/bitborg-data/containers.gitborg, /srv/bitborg-data/legacy-rename, /root/legacy-rename*, /root/keycloak-move/, and the keycloak database and role in the shared Postgres.
  • Monitoring host: /home/bitborg/.local/share/containers.gitborg, /var/lib/legacy-rename, /root/legacy-rename, and 7 unprefixed Quadlet .volume units that name gitborg-* volumes.
  • Cinder snapshots prerename-gitborg-prod-{root,data,lfs,backup,monitoring-root}-20261015.

The run refuses unless the isolated Keycloak is ready, the shared Postgres has no connection to keycloak, the current store is the active one, and on prod a weekly drill passed after 2026-10-22.

Read-only survey 2026-10-15:

Host Old store Other Shared keycloak DB
staging 5.7 GB keycloak-move 812 KB, rename state and one rolled-back state dir 21 MB
prod 12 GB keycloak-move 1.5 MB, rename state 19 MB
monitoring 2.1 GB rename state, 7 stale .volume units none

No Kanidm volume, image, secret or config directory on staging or prod.

Merge order

Merge after the purge has run on both environments. The roles are no-ops on renamed hosts, so the merge changes nothing on a host.

Checks

  • pnpm ansible:check and every lefthook pre-push job pass.
  • ansible-playbook site.yml --check: prod changed=0, monitoring changed=0, staging changed=0.

Not in this PR

Names left after the purge, outside its scope:

  • Prod and monitoring hostnames are still gitborg-prod and gitborg-prod-monitoring.
  • Forgejo Actions logs under the old org name in /srv/bitborg-lfs/actions_log/gitborg/.
  • Caddy certificate and ACME account files for the gitborg.se names.
  • Two gitborg-*.tar.age archives. They age out with backup_archive_prefixes.
  • Renovate's cache at ~/.cache/renovate/repos/forgejo/gitborg.
  • Runner Cinder snapshots named gitborg-runner-staging-*.
Title: chore(ansible): remove the legacy-rename and kanidm-cleanup roles Part of #585. ## What - Delete the `legacy-rename` role, its two `site.yml` entries, `scripts/test_legacy_rename.py` and its CI step. - Delete the `kanidm-cleanup` role and its `site.yml` entry. - Runbook "Legacy rename": keep the before/after table and a short purge record. Drop the role, window, rehearsal and soft-rollback procedure. - Runbook "Kanidm removal": drop the `kanidm-cleanup` paragraph. - Runbook "Move Keycloak to bitborg-id": the shared `keycloak` database is no longer a rollback copy. - Runbook staging "Up" step 2: pin the sshd key for `[<ip>]:2222`. The bare `<ip>` entry is only needed for the first apply, which still reaches sshd on port 22. After it, port 22 serves Forgejo's git SSH with its own key, so the step now removes that entry with `ssh-keygen -R <ip>`. `legacy_user`, `legacy_restic_host` and `legacy_secret_prefix` stay. The backup readers and the secret cleanup in three roles still use them. ## Host purge The host deletes are one-off and run outside Ansible, staging first, then prod, on 2026-10-26. They remove: - Services hosts: `/srv/bitborg-data/containers.gitborg`, `/srv/bitborg-data/legacy-rename`, `/root/legacy-rename*`, `/root/keycloak-move/`, and the `keycloak` database and role in the shared Postgres. - Monitoring host: `/home/bitborg/.local/share/containers.gitborg`, `/var/lib/legacy-rename`, `/root/legacy-rename`, and 7 unprefixed Quadlet `.volume` units that name `gitborg-*` volumes. - Cinder snapshots `prerename-gitborg-prod-{root,data,lfs,backup,monitoring-root}-20261015`. The run refuses unless the isolated Keycloak is ready, the shared Postgres has no connection to `keycloak`, the current store is the active one, and on prod a weekly drill passed after 2026-10-22. Read-only survey 2026-10-15: | Host | Old store | Other | Shared `keycloak` DB | | ---------- | --------- | --------------------------------------------------------- | -------------------- | | staging | 5.7 GB | `keycloak-move` 812 KB, rename state and one rolled-back state dir | 21 MB | | prod | 12 GB | `keycloak-move` 1.5 MB, rename state | 19 MB | | monitoring | 2.1 GB | rename state, 7 stale `.volume` units | none | No Kanidm volume, image, secret or config directory on staging or prod. ## Merge order Merge after the purge has run on both environments. The roles are no-ops on renamed hosts, so the merge changes nothing on a host. ## Checks - `pnpm ansible:check` and every lefthook pre-push job pass. - `ansible-playbook site.yml --check`: prod `changed=0`, monitoring `changed=0`, staging `changed=0`. ## Not in this PR Names left after the purge, outside its scope: - Prod and monitoring hostnames are still `gitborg-prod` and `gitborg-prod-monitoring`. - Forgejo Actions logs under the old org name in `/srv/bitborg-lfs/actions_log/gitborg/`. - Caddy certificate and ACME account files for the `gitborg.se` names. - Two `gitborg-*.tar.age` archives. They age out with `backup_archive_prefixes`. - Renovate's cache at `~/.cache/renovate/repos/forgejo/gitborg`. - Runner Cinder snapshots named `gitborg-runner-staging-*`.
supernaut lade till 2 incheckningar 2026-10-15 17:13:17 +00:00
Both hosts and staging are renamed and carry no Kanidm state, so the
one-shot roles, their site.yml entries and the rename tests go. The
runbook keeps a short record of the rename and the purge, and drops the
soft rollback and the shared Keycloak rollback, which the purge removes.

The staging "Up" step pins the sshd key for [<ip>]:2222 and drops the
bare <ip> entry after the first apply, because port 22 then serves
Forgejo's git SSH with its own key.

Part of #585
docs: name the purge leftovers and drop the stale keycloak rollback note
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m4s
5edcc8bc29
supernaut tvångsskickade chore/585-purge från 5edcc8bc29
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m4s
till dbb34cc323
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m4s
2026-10-17 10:01:56 +00:00
Jämför
supernaut tvångsskickade chore/585-purge från dbb34cc323
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m4s
till c5563f6212
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m11s
2026-10-18 19:04:45 +00:00
Jämför
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-18 19:11:13 +00:00
supernaut lade till 2 incheckningar 2026-10-18 19:12:50 +00:00
ci: drop the kanidm-cleanup legacy name allowlist entry
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m59s
f4e0c3d293
The role is deleted, so its entry is stale and fails the guard.

Refs #585
supernaut tvångsskickade chore/585-purge från f4e0c3d293
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m59s
till 2a1d9198ad
Alla kontroller lyckades
ci / ci (pull_request) Successful in 13m38s
2026-10-27 13:00:01 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-27 13:00:09 +00:00
supernaut sammanfogade incheckning 5edcb240f9 till main 2026-10-27 13:14:07 +00:00
supernaut tog bort grenen chore/585-purge 2026-10-27 13:14:08 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!759
Ingen beskrivning angiven.