Skip to content
DevOps AI ToolKit
All guides
AI for Ansible By James Joyner IV · · 7 min read Last reviewed Jul 2026

Ansible Error: 'Invalid callback for stdout specified' — Cause, Fix, and Troubleshooting Guide

Quick answer

Fix Ansible's 'Invalid callback for stdout specified' error: enable the plugin, install its collection, or fix stdout_callback config.

  • #ansible
  • #troubleshooting
  • #automation
  • #plugins
Free toolkit

Stuck on this Ansible error? Get the free incident triage checklist

A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.

Overview

Callback plugins control how Ansible renders output (the stdout callback) and can send events to logging or CI systems. When stdout_callback names a plugin Ansible cannot load — because it is not installed, not enabled, or not whitelisted — Ansible errors out or falls back and warns:

ERROR! Invalid callback for stdout specified: yaml

Or, for non-stdout callbacks:

[WARNING]: Skipping callback plugin 'profile_tasks', unable to load

Both mean the callback name in your config does not resolve to a usable plugin.

Symptoms

  • Ansible aborts at startup with Invalid callback for stdout specified.
  • Output looks plain even though you configured a fancier callback (silent fallback).
  • A [WARNING]: Skipping callback plugin ... line appears at the top of every run.
ansible-playbook -i inventory.ini site.yml
ERROR! Invalid callback for stdout specified: community.general.yaml

Common Root Causes

1. The callback’s collection is not installed

Callbacks like yaml, profile_tasks, and timer moved into community.general (or ansible.posix). Without the collection, the name will not resolve.

2. Non-stdout callbacks not enabled

Aggregate/notification callbacks must be listed in callbacks_enabled (formerly callback_whitelist). Setting only stdout_callback is not enough for those.

3. Typo or wrong callback name

yaml vs community.general.yaml, or profile_task vs profile_tasks.

4. callback_plugins path not set for a custom plugin

A local callback exists but the callback_plugins directory in ansible.cfg does not point at it.

How to diagnose

List callbacks Ansible can see:

ansible-doc -t callback -l | grep -iE 'yaml|profile|timer'

Show the effective callback config:

ansible-config dump | grep -iE 'stdout_callback|callbacks_enabled'

Fixes

Install the collection that ships the callback

ansible-galaxy collection install community.general

Set stdout_callback correctly

# ansible.cfg
[defaults]
stdout_callback = community.general.yaml
# or the built-in default:
# stdout_callback = default

Enable non-stdout callbacks

# ansible.cfg
[defaults]
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer

Point at a custom callback directory

# ansible.cfg
[defaults]
callback_plugins = ./callback_plugins

Verify the fix:

ansible-config dump | grep -i stdout_callback
ansible-playbook -i inventory.ini site.yml

What to watch out for

  • Only one stdout callback can be active at a time; the rest are aggregate/notification callbacks that need callbacks_enabled.
  • In execution environments (AWX), the collection providing the callback must be baked into the image.
  • callback_whitelist was renamed to callbacks_enabled — old configs may warn or silently ignore the old key.
Free download · 368-page PDF

Fixed it? Get 500 Ansible & DevOps AI prompts — free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.

Stuck on this? Start guided troubleshooting

Open an interactive diagnostic session with this error already loaded. Work a step-by-step plan, record what each check returns, land on a root cause, and export a clean incident summary — no account needed to start.

Did this fix your issue?

Solved it a different way?

Share the fix that worked for you — reviewed, then published to help the next engineer.

Free download · 368-page PDF

Get 500 Battle-Tested DevOps AI Prompts — Free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.