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.

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

ansible_agent_callback-0.2.0.tar.gz (10.8 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.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ansible_agent_callback-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e9e7cd34bc47a0642674ab30650574ce6fc7f9d22c33dd6f76127ae2242cbd8a
MD5 761943ce9a53f4b11bda41d56d27f9b5
BLAKE2b-256 aaf6885287a72f931bb969e629091675d34ebacef89304d4396e5f2f99a30ee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansible_agent_callback-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f03a4c601a03ba7015c3ecae1b439a2e1ca62ad57e2ce42c59c658b7c40a990a
MD5 122c7ab9441d7932003a2d31cf74b6f3
BLAKE2b-256 7457e694beef520a6e6f4813ea7b2bb3b4db8c6b242ffbe82a5045c380048f7d

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