Token-optimized Ansible output for AI coding agents
Project description
ansible-agent-callback
Token-optimized Ansible stdout callback plugin for AI coding agents. Reduces output by 70-90% compared to the default callback.
Quick Start
uvx ansible-agent-callback install
This installs the callback plugin and interactively configures your AI coding agents (Claude Code, Codex CLI, Gemini CLI, etc.).
Usage
# Via environment variable
ANSIBLE_STDOUT_CALLBACK=agent ansible-playbook site.yml
# Or configure permanently via the installer
Output Format
One line per event, pipe-delimited:
PLAY | Configure webservers
TASK | Install nginx
ok | web01
changed | web02 | diff: +worker_processes 4;
failed | db01 | msg: Permission denied
RECAP | web01: ok=3 changed=1 | db01: ok=1 failed=1
- Skipped tasks are hidden
- No color codes or decorative formatting
- Full details only on failures
Commands
ansible-agent-callback install # Install plugin + configure agents
ansible-agent-callback install --plugin-only # Just the plugin
ansible-agent-callback install --all # Auto-configure detected agents
ansible-agent-callback install --agents claude-code,codex-cli
ansible-agent-callback uninstall # Remove plugin + agent configs
ansible-agent-callback env # Print export for other agents
Supported Agents
| Agent | Config |
|---|---|
| Claude Code | ~/.claude/settings.json |
| Codex CLI | ~/.codex/config.toml |
| Gemini CLI | ~/.gemini/.env |
| Shell profile | ~/.zshrc or ~/.bashrc |
| Ansible global | ~/.ansible.cfg |
Development
make dev # Install in editable mode
make test # Run tests
make build # Build package
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ansible_agent_callback-0.2.0.tar.gz.
File metadata
- Download URL: ansible_agent_callback-0.2.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e7cd34bc47a0642674ab30650574ce6fc7f9d22c33dd6f76127ae2242cbd8a
|
|
| MD5 |
761943ce9a53f4b11bda41d56d27f9b5
|
|
| BLAKE2b-256 |
aaf6885287a72f931bb969e629091675d34ebacef89304d4396e5f2f99a30ee7
|
File details
Details for the file ansible_agent_callback-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ansible_agent_callback-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03a4c601a03ba7015c3ecae1b439a2e1ca62ad57e2ce42c59c658b7c40a990a
|
|
| MD5 |
122c7ab9441d7932003a2d31cf74b6f3
|
|
| BLAKE2b-256 |
7457e694beef520a6e6f4813ea7b2bb3b4db8c6b242ffbe82a5045c380048f7d
|