Fix pause module so it does not stack trace when redirecting stdout. (#42217)

* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY
This commit is contained in:
Sam Doran 2018-07-06 17:19:55 -04:00 committed by GitHub
commit 1d1595b990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 18 deletions

View file

@ -15,6 +15,12 @@ ansible-playbook test-pause-no-tty.yml -i ../../inventory 2>&1 | \
}
EOF
# Test redirecting stdout
# Issue #41717
ansible-playbook pause-3.yml -i ../../inventory > /dev/null \
&& echo "Successfully redirected stdout" \
|| echo "Failure when attempting to redirect stdout"
# Test pause with seconds and minutes specified
ansible-playbook test-pause.yml -i ../../inventory "$@"