do-ansible-smart
See what an Ansible project actually does — before it runs.
do-ansible-smart is a local workbench for Ansible developers. It reads a project the way Ansible itself does — plays, blocks, tasks and handlers with their exact source positions — instead of guessing from the text. It is built to answer four questions at the cursor: what may go here, is this legal, where does this value come from, and what does it compose to, each with an honest statement of what can be known without running Ansible. It runs entirely on your own machine, and your project files stay the single source of truth.
Features
Read your project’s real structure
check <project-dir>subcommand: walks a project, parses every YAML file and prints its play/block/task structure with byte-faithful source positions.- Ansible-faithful scalar typing: plain YAML scalars are typed the way Ansible’s PyYAML (YAML 1.1) reads them, not a generic YAML 1.2 reader, so values match what Ansible would see.
Catch syntax errors where they happen
- Positioned syntax diagnostics: an adapter runs
ansible-playbook --syntax-checkon the project and turns its output into diagnostics carrying path, line and column, with every position confirmed to fall inside the project.
Built for scripts and robust local runs
- Process-isolated parsing: the parser runs in a separate, killable worker so a runaway parse cannot hang the tool, shipped as a single binary.
- Stable exit codes (
0clean,1findings,2bad invocation) for use in scripts and pipelines.
Status: early. The structure reader, the syntax-check adapter and the parse
worker hold real, tested code; the browser UI, server and execution flows below
are designed but not yet built. See README.md and GOAL.md for the honest
current state.
Roadmap
- Local browser workbench and editor on localhost (planned — not yet built).
- GraphQL API over the parsed structure (schema-first, designed, not built).
- Variable provenance and cross-reference: where each value comes from and which precedence level wins (planned).
- Interactive walkthrough that flips variables to show which path a playbook would take (planned).
- Catalogue of the full Ansible surface — module, keyword and plugin options — harvested from the locally installed Ansible (planned).
- Mandatory sandboxed dry-runs (Landlock ABI ≥ 4) so untrusted projects can be checked by executing the user’s own Ansible safely (decided precondition, ARCHITECTURE §8, not yet built).
- Redis sidecar holding only the derived index, discardable at any time (planned).