Skip to content
DevOps AI ToolKit
Newsletter
All guides
AI for Ansible By James Joyner IV · · 7 min read

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.

Part of the Ansible Playbook & Module Errors hub
  • #ansible
  • #troubleshooting
  • #automation
  • #plugins
Free toolkit

Fixing errors like this? Get 500 free DevOps AI prompts

500 copy-paste AI prompts for the stack you actually run — one PDF, free.

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

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.