-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Goal
Add a filter for ansible-playbook — one of the most widely used configuration management and automation tools, with notoriously verbose CI output.
Background
Every Ansible task emits at minimum two lines per host: the task name header and the result. A playbook with 100 tasks across 50 hosts generates 5,000+ lines, the vast majority being ok: [hostname] (no change occurred). In CI, these overwhelm the actual signal.
The meaningful lines are:
changed: [hostname]— something was modified (worth knowing)failed: [hostname]— something broke (critical)fatal: [hostname]— unrecoverable failure (critical)PLAY RECAP— the final summary
ok and skipping lines represent zero new information in post-run review.
Filters to Add
ansible/playbook.toml — ansible-playbook
- Skip:
ok: [hostname]result linesskipping: [hostname]result linesTASK [role : task name] ****...header lines for tasks that resulted inokorskipping
- Keep:
changed: [hostname]result lines (with their preceding task header)failed: [hostname]result lines (with preceding task header)fatal: [hostname]result linesPLAY RECAPsection and all lines within itPLAY [play name]headers- Lines containing
msg:from failed tasks (the error message)
Consider section parsing: track each TASK [...] header, then decide to keep or discard based on whether the result line is ok/skipping vs changed/failed/fatal.
ansible/lint.toml — ansible-lint
- Skip:
[WARNING]lines from rules atwarningseverity whenerrorlevel violations exist - Keep: All violation lines with rule ID and file:line reference, summary
Fixture Files Needed
tests/fixtures/ansible/playbook-allok.txt— large playbook run with all tasksoktests/fixtures/ansible/playbook-changes.txt— playbook with mix ofok,changed,skippingtests/fixtures/ansible/playbook-failure.txt— playbook with a task failuretests/fixtures/ansible/lint-violations.txt— ansible-lint output with errors and warnings
Acceptance Criteria
-
ok:andskipping:task result lines removed from output -
changed:lines and their task headers preserved -
failed:/fatal:lines and their task headers and error messages preserved -
PLAY RECAPsection always fully preserved - Integration tests pass for all fixture files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request