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
parent 39ec12f395
commit 1d1595b990
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 "$@"