Repository navigation
feat(infra): plan a playbook of an infra repo in check mode - #5196
Conversation
`devops infra plan <repo> <playbook> [--limit] [--tags] [--ref]` runs a playbook of an infra repo in check mode with diffs and keeps the plan record. The command exports one commit that origin holds (by default the head of the default branch; --ref takes a branch of origin or pull/<number>/head) into the project folder of a private ansible-runner data folder under <data dir>/infra/<owner>/<name>/plans/. It never reads the working tree. The run installs the pinned collections of collections/requirements.yml once for each version of the file, and runs ansible-runner with --check --diff -v, the limit <limit>:!<offline group>, the key of devops ssh, host key checks on and the rendered task arguments in each result. The job events give, for each host, the changed tasks, the changes with the diff hidden, the unchecked tasks and the disruptive classes reboot, service-restart:<unit> and drain. The plan id is the SHA-256 of the facts of the plan, without the time. A failed task marks the plan failed, and the command exits 1. An agent needs the agent access level plan. --dry-run starts no process. The tests use recorded runner events of a probe repo in tests/fixtures/infra/runner_events/.
Move the change folder to the archive and add the infra-plan spec.
Live run on dan-petty/homelab (2026-11-12)
The planThe run recap in the runner artifacts:
No host changedI read hawk with a read-only ad-hoc
Checks run locally
|
🤖 I have created a release *beep* *boop* --- ## [0.123.0](v0.122.0...v0.123.0) (2026-11-12) ### Features * **infra:** plan a playbook of an infra repo in check mode ([#5196](#5196)) ([050a6ef](050a6ef)) * **monitoring:** enable the image renderer for panel checks ([#5193](#5193)) ([e413c40](e413c40)) ### Bug Fixes * **monitoring:** make the GitHub and command panels readable ([#5194](#5194)) ([e99810e](e99810e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
devops infra plan <repo> <playbook>runs a playbook of an infra repo in check mode and keeps the plan record that the apply of #5125 checks. It exports one commit of origin (default branch, or--refa branch orpull/<n>/head) into a private ansible-runner folder under<data dir>/infra/<owner>/<name>/plans/, never the working tree. It installs the pinned collections once, and runs with--check --diff -v,<limit>:!<offline group>, thedevops sshkey and host key checks on. The job events give for each host the changes, the hidden diffs, the unchecked tasks, the failures and the disruptive classesreboot,service-restart:<unit>anddrain. The id is the SHA-256 of the facts. A failed plan exits 1. An agent needs the levelplan;--dry-runstarts no process.Closes #5124
Change:
openspec/changes/archive/2026-11-12-5124-plan-a-playbook-of-an-infra/