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.
ERROR! Invalid callback for stdout specified: community.general.yamlCommon 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.
ansible-galaxy collection install community.generalEnable the callback in config
- Set
stdout_callbackto a plugin that is installed. - List non-stdout callbacks in
callbacks_enabled. - Re-run to confirm the plugin loads.
# ansible.cfg
[defaults]
stdout_callback = community.general.yaml
callbacks_enabled = profile_tasksHow 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.