Trailing newline added to stdout #23730
Labels
affects_2.3
This issue/PR affects Ansible v2.3
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
windows
Windows community
ISSUE TYPE
COMPONENT NAME
stdout from script module in Windows
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Running Ansible from CentOS 6.8
Managing Windows 2012 servers
SUMMARY
Ansible 2.3.0 is adding a traling newline to stdout, and this is making some string comparisons fail.
This does not happen with Ansible 2.2.1, because that version does not append newline to stdout.
STEPS TO REPRODUCE
Use the script module to run a powershell script in Windows and register the output. For example:
EXPECTED RESULTS
With Ansible 2.2.1 we don't have a trailing newline in stdout:
ACTUAL RESULTS
With Ansible 2.3.0 we have a trailing newline in stdout:
The text was updated successfully, but these errors were encountered: