Stop your Ansible callbacks from silently eating your CI runner output
By Saket Jain Published Linux/Unix
Stop your Ansible callbacks from silently eating your CI runner output
Technical Briefing | 7/21/2026
I spent half a morning last week watching a GitLab runner sit perfectly still while a long-running Ansible playbook supposedly did its thing. It wasn’t hung, it wasn’t erroring out, and the process tree looked healthy. It was just keeping its secrets. Turns out, the default callback plugin was buffering output because it decided the stream wasn’t interactive, hiding the actual progress of the tasks.
Why your terminal environment matters more than you think
Ansible detects if it’s running in a TTY. If it isn’t, which is almost always the case in CI, it changes its behavior. This usually manifests as the default stdout plugin switching to a non-interactive mode that buffers data. When you have a task that takes ten minutes to download a large artifact or compile a module, you get zero feedback. You’re left staring at a blank wall until the task finally finishes or, worse, the runner timeout kicks in and nukes the job.
ANSIBLE_STDOUT_CALLBACK=debug ANSIBLE_FORCE_COLOR=1 ansible-playbook site.yml
- Force the debug plugin to ensure every single task output is flushed immediately
- Use ANSIBLE_FORCE_COLOR so your log files remain readable instead of becoming a wall of ANSI escape characters
- Stop relying on the default callback if your tasks take longer than thirty seconds to execute
This isn’t just about pretty logs. When a task dies silently, your pipeline stays red, but you have no clue what line of code triggered the failure. By switching to the debug callback, you get the full execution context printed to stdout as it happens. If your runner is still quiet after this change, check if your application layer has its own internal buffering, but at least now you’ve ruled out Ansible’s default behavior.
Next time a playbook goes dark, don’t guess—force the callback to be chatty. It saves you from digging through temp directories looking for partial logs that might not even exist yet.
