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.
Getting Started
Install the plugin and configure your AI coding agents in one command:
uvx ansible-agent-callback install
This will:
- Copy the callback plugin to
~/.ansible/plugins/callback/ - Detect which AI coding agents you have installed
- Let you pick which ones to configure (detected agents are pre-selected)
To skip the interactive selector and configure everything automatically:
uvx ansible-agent-callback install --all
That's it. Your agents will now use the token-optimized output when running Ansible.
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.3.1.tar.gz.
File metadata
- Download URL: ansible_agent_callback-0.3.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
674836310daf2d8cf079785d7383c385a001563db59bfd1548d9ccaa3fb5e373
|
|
| MD5 |
5b2b8c24b514ca167f4af91c2fb54a78
|
|
| BLAKE2b-256 |
3ebbc7c4352389fd08516d77b5c76c10213b68d671e87649bd77abad00d43945
|
File details
Details for the file ansible_agent_callback-0.3.1-py3-none-any.whl.
File metadata
- Download URL: ansible_agent_callback-0.3.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd2aa14a8f96406015c0dad573bda58dc581c51a0622f8127d4da9c880d10f8b
|
|
| MD5 |
50e26ceb4e8a9b1f0cce323a97f9d3db
|
|
| BLAKE2b-256 |
1040b301ce41f3878ddb7601cac4042ed8856974359146512ffa995fcea4fa46
|