Skip to content

Forward ansible-runner subprocess stderr to job output#111

Open
adamruzicka wants to merge 2 commits into
theforeman:masterfrom
adamruzicka:error
Open

Forward ansible-runner subprocess stderr to job output#111
adamruzicka wants to merge 2 commits into
theforeman:masterfrom
adamruzicka:error

Conversation

@adamruzicka

Copy link
Copy Markdown
Contributor

Runner::Parent#publish_data is a no-op, so stderr from the subprocess was silently discarded. This change overrides the process manager callbacks to route stderr through broadcast_data instead, making errors such as "ansible-runner: command not found" visible in the job output.

Normal playbook output is captured via artifact files, so ansible-runner's direct stdout/stderr is redundant. The -q flag silences it, ensuring only genuine errors (e.g. command not found) reach the stderr broadcast path.

Original
image

Patched - ansible-runner missing
image

Patched - ansible-runner available, but ansible-playbook missing (this comes from ansible-runner's artifacts)
image

adamruzicka and others added 2 commits May 14, 2026 12:31
Runner::Parent#publish_data is a no-op, so stderr from the subprocess
was silently discarded. Override set_process_manager_callbacks to route
stderr through broadcast_data instead, making errors such as
"ansible-runner: command not found" visible in the job output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Normal playbook output is captured via artifact files, so ansible-runner's
direct stdout/stderr is redundant. The -q flag silences it, ensuring only
genuine errors (e.g. command not found) reach the stderr broadcast path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@adamruzicka

Copy link
Copy Markdown
Contributor Author

CI should be addressed by #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant