Repository navigation
Description
Split from #4648.
homelab uses Ansible and Kubernetes manifests. An implement run cannot run ansible-lint, because ansible and ansible-lint are in neither RUNNER_TOOLS nor NOT_IN_RUNNER, and ansible-core is in NOT_IN_RUNNER. The ansible preset cannot join PRESETS until the devtools image holds these programs: the image smoke test checks every RUNNER_TOOLS row. This part waits on dan-petty/devtools#97, which adds ansible and ansible-lint to the devtools image. Acceptance criteria: the toolchain registry holds an ansible preset whose static_check names ansible-lint and kube-linter and whose test_command is None; RUNNER_TOOLS holds ansible and ansible-lint with a non-empty check command; ansible-core leaves NOT_IN_RUNNER, and no program is in both tables; a test reads the first word of each command in each preset and fails when a word is in NOT_IN_RUNNER or in neither table; the image smoke test runs python -m devops_cli.roadmap.runner_tools and proves ansible and ansible-lint; the runner image scan passes with no lowered threshold.
Proposed design
Problem statement
homelab uses Ansible and Kubernetes manifests. An implement run cannot lint them. ansible and ansible-lint are in neither RUNNER_TOOLS nor NOT_IN_RUNNER, and ansible-core is in NOT_IN_RUNNER. The toolchain registry has no ansible preset. This change adds the preset, the two runner rows, and a test that keeps each preset command in the runner tables. The change waits on dan-petty/devtools#97.
Acceptance criteria
Requirement: Ansible preset in the toolchain registry
The toolchain registry SHALL hold an ansible preset whose static_check names ansible-lint and kube-linter, and whose test_command is None.
Scenario: The ansible preset
- WHEN A test reads
PRESETS["ansible"]fromsrc/devops_cli/roadmap/toolchains.py. - THEN The preset's
static_checkcontainsansible-lintandkube-linter, and itstest_commandisNone.
Requirement: Ansible runner tool rows
RUNNER_TOOLS SHALL hold a row for ansible and a row for ansible-lint, and each row SHALL have a non-empty check command.
Scenario: The two rows have check commands
- WHEN A test reads the rows
ansibleandansible-lintofRUNNER_TOOLSinsrc/devops_cli/roadmap/runner_tools.py. - THEN Both rows exist and each check command is not empty.
Requirement: No program in both tables
ansible-core MUST leave NOT_IN_RUNNER, and no program MUST be in both RUNNER_TOOLS and NOT_IN_RUNNER.
Scenario: The table keys are disjoint
- WHEN A test compares the keys of
RUNNER_TOOLSandNOT_IN_RUNNER. - THEN
ansible-coreis not inNOT_IN_RUNNER, and the two key sets share no program.
Requirement: Preset commands stay in the runner tables
A test SHALL read the first word of each command that a preset names, and SHALL fail when that word is in NOT_IN_RUNNER or in neither table.
Scenario: A preset command word outside the tables
- WHEN A preset names a command whose first word is in
NOT_IN_RUNNER, or whose first word is in neitherRUNNER_TOOLSnorNOT_IN_RUNNER. - THEN The test fails and its message names the preset and the first word.
Requirement: Runner image proves the two rows
The runner image smoke test MUST prove that ansible and ansible-lint run in the image.
Scenario: Smoke test on the runner image
- WHEN The
ci.ymlsmoke test runspython -m devops_cli.roadmap.runner_toolson the built runner image. - THEN The command exits 0, and the check command of each of the two rows succeeds.
Requirement: Runner image scan keeps its threshold
The change MUST lower no threshold of the runner image scan.
Scenario: Runner image scan
- WHEN The Runner Image job runs the image scan action on the built runner image.
- THEN The scan completes with its configured exit code, and the change sets no lower threshold in the workflow or in the action.
Existing Tool Considered
No alternatives check has run on this issue. The open, maintained tools ansible-lint (Ansible project) and kube-linter (StackRox) cover the need: ansible-lint checks Ansible playbooks and roles, and kube-linter checks Kubernetes manifests. They lack a place in the preset registry and the runner tool table, and the runner image does not hold ansible-lint yet. The change adds no linter of its own. The glue is one preset entry, two table rows, one removed row and one test, about 40 lines; no build-and-match cost applies.
Key questions
- Which checks does the
ansiblepreset name, and what is itstest_command?: The preset namesansible-lintandkube-linterinstatic_check, and itstest_commandisNone.ansible-lintcovers the playbooks andkube-lintercovers the Kubernetes manifests. (best practice) [sources: src/devops_cli/roadmap/toolchains.py:75, src/devops_cli/roadmap/runner_tools.py:119]- Chosen:
ansible-lintandkube-linter. The issue body names these two tools, and each checks one half of the repository. - Rejected:
ansible-lintonly. It leaves the Kubernetes manifests of the environment tree unchecked. - Rejected: A
test_commandthat runs a playbook. The body setstest_commandtoNone, because an infra repo has no single test playbook.
- Chosen:
- Which table holds
ansible-coreafter the change?:ansible-coreleavesNOT_IN_RUNNER. No separate row is needed, because theansiblerow names the program that the package provides. (best practice) [sources: src/devops_cli/roadmap/runner_tools.py:119, src/devops_cli/roadmap/runner_tools.py:234]- Chosen: Leave
NOT_IN_RUNNERand add no row. Theansiblerow proves the program, and a second row for the same program gives no new check. - Rejected: Move it to
RUNNER_TOOLS. Its version command repeats theansiblerow, so the table would hold two rows for one program. - Rejected: Keep it in
NOT_IN_RUNNER. The runner now counts on the program that the package provides, so the exclusion is false.
- Chosen: Leave
- Where does the new consistency test live?: The test lives in
tests/roadmap/test_roadmap_runner_tools.py, which already testsRUNNER_TOOLSandNOT_IN_RUNNER. (best practice) [sources: tests/roadmap/test_roadmap_runner_tools.py, src/devops_cli/roadmap/toolchains.py:75]- Chosen: Add it to
tests/roadmap/test_roadmap_runner_tools.py. The module already reads both tables, and the new test reads the same two tables. - Rejected: Add a new
tests/roadmap/test_roadmap_toolchains.py. A second module for one test adds a file and splits the table checks.
- Chosen: Add it to
- Why does the change wait on
dan-petty/devtools#97?: The runner image builds FROM the devtools image. The smoke test runspython -m devops_cli.roadmap.runner_toolson the built image, so a row for a program that the image lacks fails the job. The image holdsansibleandansible-lintonly afterdan-petty/devtools#97. [sources: docs/CLUSTER.md:78, src/devops_cli/roadmap/runner_tools.py:119] - Does the runner image scan need a lower threshold for the new binaries?: No. The scan action runs with
exit-code: "0"and sends its findings to code scanning, so it stops no build. The change sets no lower threshold. [sources: docs/CLUSTER.md:78]
Fit
Fits in one pull request.
Suspected block
dan-petty/devtools#97 adds ansible and ansible-lint to the devtools image.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 26, 2026
Both add specific tools to RUNNER_TOOLS and PRESETS in runner_tools.py, but the candidate adds ansible and ansible-lint while #3562 adds kubectl and kube-linter.devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Dec 1, 2026
Superseded by the owner decisions of 2026-12-01: the Service jobs give the agent a project-neutral prompt, and the pre-commit hooks of the repository and its pull request CI are the only checks. The toolchain presets and the devops ci command are deleted. See #8040 (implement and fix jobs) and #8039 (stage job). This item extends the toolchain presets.