Ansible Error: 'Invalid callback for stdout specified' — Cause, Fix, and Troubleshooting Guide
Fix Ansible's 'Invalid callback for stdout specified' error: enable the plugin, install its collection, or fix stdout_callback config.
- #ansible
- #troubleshooting
- #automation
- #plugins
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_whitelistwas renamed tocallbacks_enabled— old configs may warn or silently ignore the old key.
Related
- Ansible Error: ‘The module was not found in configured module paths’
- Ansible Callback Plugins for Better Logging and Observability
- Ansible Error: couldn’t resolve module/action
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.
That looks like it may contain a secret (key, token, password, or connection string). Please remove it — a note with a detected secret can’t be published.
Thanks — that helps. Published notes appear after a quick review.
More Ansible prompts & error guides
Every Ansible AI prompt and troubleshooting guide, in one place.
Trending errors this week
The error guides other engineers are actually reading right now.
- 1mount: wrong fs type, bad option, bad superblock
- 2Docker 'failed to set up container networking': Fix the Bridge and IP Pool
- 3Docker 'failed to create shim task': How to Fix the containerd Runtime Error
- 4Transport endpoint is not connected
- 5modprobe: FATAL: Module not found
- 6mount: wrong fs type, bad option, bad superblock
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.