Skip to content
Latchkey

Ansible "Invalid callback ... was not found" plugin error in CI

Ansible could not load the callback plugin named in your configuration. The plugin ships in a collection that is not installed, or it is not enabled, so the requested stdout or notification callback cannot be used.

What this error means

The run fails at startup with "ERROR! Invalid callback for stdout specified: yaml" or "Callback X was not found", usually right after reading ansible.cfg.

ansible
ERROR! Invalid callback for stdout specified: community.general.yaml

Common causes

The callback collection is not installed

A stdout callback like community.general.yaml lives in a collection that the runner has not installed.

The callback is not enabled

Non-stdout callbacks must be listed in callbacks_enabled; if omitted, Ansible refuses to load them.

How to fix it

Install the collection that provides the callback

Install the collection before the run so the plugin can load.

Terminal
ansible-galaxy collection install community.general

Enable the callback in config

  1. Set stdout_callback to a plugin that is installed.
  2. List non-stdout callbacks in callbacks_enabled.
  3. Re-run to confirm the plugin loads.
ansible.cfg
# ansible.cfg
[defaults]
stdout_callback = community.general.yaml
callbacks_enabled = profile_tasks

How to prevent it

  • Install the collections that provide your callbacks in CI.
  • List non-stdout callbacks in callbacks_enabled.
  • Fall back to a built-in stdout callback when a plugin is unavailable.

Frequently asked questions

What causes ""Invalid callback ... plugin""?
A stdout callback like community.general.yaml lives in a collection that the runner has not installed.
How do I fix "Invalid callback ... plugin"?
Install the collection before the run so the plugin can load.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card