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.1.2.tar.gz (10.5 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.1.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ansible_agent_callback-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dac7c41c77c833f27fff5718de4e7e6f733b75da9384b835ded21421c44944d0
MD5 01ad6b3f25193e7e5da0bcde48d49605
BLAKE2b-256 9ab0ace177d2f7b6af9e650bb5956e9ebae120de2eccc3a1e228d6392b288083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansible_agent_callback-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c69da683497f03b7d05d6aee24dd798c521015af9b0c1690da9090763c9d070
MD5 f5f927c1c0415cea7d75463b0cc24563
BLAKE2b-256 71d1bdf5ee587b276f492e818f1bd0fa30d76b1795a4a8edf32d4308666db3e1

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