Skip to main content

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:

  1. Copy the callback plugin to ~/.ansible/plugins/callback/
  2. Detect which AI coding agents you have installed
  3. 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

ansible_agent_callback-0.3.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_agent_callback-0.3.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file ansible_agent_callback-0.3.1.tar.gz.

File metadata

File hashes

Hashes for ansible_agent_callback-0.3.1.tar.gz
Algorithm Hash digest
SHA256 674836310daf2d8cf079785d7383c385a001563db59bfd1548d9ccaa3fb5e373
MD5 5b2b8c24b514ca167f4af91c2fb54a78
BLAKE2b-256 3ebbc7c4352389fd08516d77b5c76c10213b68d671e87649bd77abad00d43945

See more details on using hashes here.

File details

Details for the file ansible_agent_callback-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansible_agent_callback-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2aa14a8f96406015c0dad573bda58dc581c51a0622f8127d4da9c880d10f8b
MD5 50e26ceb4e8a9b1f0cce323a97f9d3db
BLAKE2b-256 1040b301ce41f3878ddb7601cac4042ed8856974359146512ffa995fcea4fa46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page