Description
Ansible-runner 2.4.0
Ansible 2.17
Python 3.10.12
I'm using ansible-runner to execute ansible playbooks in a containerized environment. Existing configuration works fine.
Occasionally, ansible-runner will stop writing output to stdout but playbook execution will continue. This behaviour is very consistent and seems to occur when a given ansible task returns a large number of output lines. No errors are thrown, only that the ansible-runner process exits to the terminal prompt without showing the remaining task output or the PLAY RECAP.
artifacts/myjob/stdout file matches what I see on my local terminal.
artifacts/myjob/job_events lists all the events correctly, including the large number of output lines.
To troubleshoot, I've invoked the podman command directly using all the same parameters as runner (work dir, volumes, env file, ansible-playbook command) and the container is able to write the entire playbook output to stdout with no problem, so likely not an issue with my ansible configuration or callbacks. Changing the ansible verbosity also doesn't affect this behaviour, leading me to believe it's not really about the amount of text written to stdout.
In this instance, I'm receiving the output of a Powershell Get-Module command, but I experience the same behaviour any time I'm working with a large amount of data in a single task. I don't have an exact threshold, but several thousand lines at least.
Expected Behaviour:
TASK [my_redacted_playbook : IncludeLargeOutputTask] ******
included: /runner/project/path/to/my_redacted_playbook/tasks/largeOutput.yml for MyServer01
TASK [my_redacted_playbook : TaskWithLargeOutput] ******
changed: [MyServer01] => changed=true
debug: []
error: []
host_err: ''
host_out: ''
information: []
output:
< many output lines - 200KB or so >
result: {}
verbose: []
warning: []
PLAY RECAP ******
MyServer01 : ok=11 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
user@My-PC:~/ansible$
Actual Behaviour:
TASK [my_redacted_playbook : IncludeLargeOutputTask] ******
included: /runner/project/path/to/my_redacted_playbook/tasks/largeOutput.yml for MyServer01
user@My-PC:~/ansible$