Forward ansible-runner subprocess stderr to job output#111
Open
adamruzicka wants to merge 2 commits into
Open
Conversation
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>
Contributor
Author
|
CI should be addressed by #112 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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

Patched - ansible-runner missing

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