I would like to enrich my Ansible logs with info from the Verbose stream. Using Ansible 2.9.25 with Powershell 5.1
So I am trying to tie verbose output to standard out:
- win_shell: Expand-Archive jinja2_files.zip -DestinationPath . -Force -Verbose 4>&1
args:
chdir: e:\temp\Unzip
Expand-Archive is one of the Powershell cmdlet that supports -Verbose but the behavior is exactly the same with other cmdlets.
No matter what I do my stdout is blank in the task output log:
"stdout": "",
I could redirect to a temp file, read it and discard it but hopefully there is a better way.
Confirmed Ansible is able to write to both sdout and sderr.