refactor(ansible): trim VM provisioning checks

This commit is contained in:
Hermes Agent committed 2026-11-09 14:09:35 +00:00
1 parent ef9b4454ff
commit 9b015b6987
2 files changed
+9 -64

No files matched your search

+1 -1
View File
@@ -16,4 +16,4 @@ In a Semaphore Variable Group, set fixed `proxmox_api_host` (hostname, not URL),
Only `vlan66` maps to `lab.vezpi.com` in the playbook; unknown VLANs fail before API provisioning. `vm_hostname` must be a single short DNS label (no dots). DHCP/DNS must publish `<hostname>.lab.vezpi.com` for the chosen VNet; a derived name is not proof of a current record. Stale/reused DNS can point at another host: verify record ownership and the new guest's SSH host key out of band before running. Never trust an unverified `ssh-keyscan` result or disable host-key checking.
Use a template with bootable `scsi0`, a `scsi1` cloud-init drive, Python 3, `cloud-init`, `timeout`, SSH and a reachable guest network. Select an SSH Key Store **user credential on the task inventory** whose private key matches one authorized public key for `vm_user`; the same Ansible invocation's inventory credential must be available to the dynamically added guest (verify this in the installed Semaphore version). The localhost API token is separate. Pre-enroll a verified guest host key in the runner's trusted `known_hosts` using a Captain-approved mechanism; no private key path or trust bypass is configured here. DNS, SSH port, Python-capable Ansible connection, cloud-init wait/status and final Ansible ping are bounded stages. The connection check retries transient transport failures within its timeout; Python 3 is required in the image. Completed cloud-init status accepts rc 0 or degraded rc 2, prints `--long` diagnostics and warns on rc 2; other codes, incomplete status and timeouts fail. A failed or timed-out VM remains for Captain to inspect, not delete. After accepted cloud-init completion, the guest timezone is verified as `Europe/Paris` (CET/CEST); RTC and NTP are untouched. The guest needs `timedatectl`, timezone data (`tzdata`), and authorized noninteractive sudo/become for `vm_user` when a timezone change is needed. If these are unavailable, readiness fails; no sudo configuration, package installation or reboot is added.
Use a template with bootable `scsi0`, a `scsi1` cloud-init drive, Python 3, `cloud-init`, `timeout`, SSH and a reachable guest network. Select an SSH Key Store **user credential on the task inventory** whose private key matches one authorized public key for `vm_user`; the same Ansible invocation's inventory credential must be available to the dynamically added guest (verify this in the installed Semaphore version). The localhost API token is separate. Pre-enroll a verified guest host key in the runner's trusted `known_hosts` using a Captain-approved mechanism; no private key path or trust bypass is configured here. DNS, SSH port, Python-capable Ansible connection, cloud-init wait/status and final Ansible ping are bounded stages. The connection check retries transient transport failures within its timeout; Python 3 is required in the image. Completed cloud-init status accepts rc 0 or degraded rc 2, prints `--long` diagnostics and warns on rc 2; other codes, incomplete status and timeouts fail. A failed or timed-out VM remains for Captain to inspect, not delete. After accepted cloud-init completion, the guest timezone is read and, if needed, set to `Europe/Paris` (CET/CEST); RTC and NTP are untouched. The guest needs `timedatectl`, timezone data (`tzdata`), and authorized noninteractive sudo/become for `vm_user` when a timezone change is needed. If these are unavailable, readiness fails; no sudo configuration, package installation or reboot is added.