Loading_
Loading_
Serial, health-gated patching across Linux fleets with pre-checks, service verification and automatic halt on regression.
---# ─────────────────────────────────────────────────────────────────────────# AIInfraEngine — Ring-based patch rollout## ansible-playbook patch-rollout.yml -i inventories/prod -e ring=canary# ansible-playbook patch-rollout.yml -i inventories/prod -e ring=broad --check## Version: 3.6.0# ───────────────────────────────────────────────────────────────────────── - name: "Patch rollout — ring {{ ring | default('canary') }}" hosts: "{{ ring | default('canary') }}" become: true serial: "{{ batch_size | default('20%') }}" any_errors_fatal: true # one failed batch halts the whole wave max_fail_percentage: 0 vars: reboot_timeout: 900 min_free_disk_mb: 2048 critical_services: - sshd - chronyd lb_drain_wait: 30 pre_tasks: # ── Guard rails ──────────────────────────────────────────────────── - name: Refuse to run inside a change freeze162 more lines behind the library licence
patch-rollout.yml · 6.5 KB · 3 dependencies documented
This one is behind the licence because it is the kind of script that does real damage when it is wrong — and the version above has already been broken and fixed by two engineers in a live estate.
Patching a fleet is not one operation, it is many small ones that must each be verifiable. This playbook runs serially in configurable batches so a bad patch affects one batch rather than the estate.
Before patching, it snapshots service state and disk headroom. After patching and reboot, it verifies the same services came back and that the host is reachable. If verification fails, `any_errors_fatal` stops the run and the remaining batches are never touched.
Hosts are drained from the load balancer before patching and only returned after health verification passes — the rollout is invisible to users.
| Name | Type | Required | Description |
|---|---|---|---|
ring | string | Required | Inventory group to target (canary, pilot, broad). |
batch_size | string | Optional | Serial batch size. Default 20%. |
lb_api | string | Optional | Load balancer API base URL for drain/enable. |
The platform turns any script into a governed automation — versioned, gated, audited and reversible.