feat(post-install): moteur de profils + bootstrap + identité/réseau (tâche 2 SJ-8)

- templates custom/bootstrap-root + identity-network (sortie structurée parsable,
  sauvegardes, échec contrôlé, jamais de coupure réseau sans reconnexion)
- postInstall: registre de manifestes (champs typés + defaults/defaultFrom),
  validateProfileValues + maskSecretValues + buildPostInstallResult (TDD),
  renderProfile/previewProfile (masquage secrets), runPostInstall (SSH)
- execute: RunActionOpts.profileId/values + branche post_install (bloc postInstall)
- action_requests: post_install accepté, payload profileId/values transmis à approve
- routes: GET /profiles, POST .../preview (script masqué + validation),
  POST .../run (action_request si requiresConfirmation, sinon direct)

Champs = formulaire (pas de question SSH interactive) ; secrets jamais sérialisés ;
identity_network exige confirmation. tsc 0 · 101 tests · build OK · boot OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 08:02:32 +02:00
parent faa654c95a
commit e6f4ae470b
10 changed files with 566 additions and 3 deletions
+15
View File
@@ -12,6 +12,21 @@ export interface TemplateVars {
composeRoots?: string | number | null;
composeScanDepth?: string | number | null;
stackDir?: string | null;
// Post-install (SJ-8) — toutes optionnelles, jamais de secret.
operatorUser?: string | null;
packages?: string | null; // liste shell-safe rendue par le backend
newHostname?: string | null;
domain?: string | null;
interfaceName?: string | null;
staticAddress?: string | null;
gateway?: string | null;
dnsNameservers?: string | null;
reconnectHost?: string | null;
dhcpEndpoint?: string | null;
dockerUser?: string | null;
composeRoot?: string | null;
rebootAfterInstall?: boolean;
[key: string]: unknown; // champs de profil dynamiques (typés au cas par cas)
}
export function renderTemplate(