diff options
author | Matt Clay <matt@mystile.com> | 2019-04-03 23:22:55 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2019-06-21 15:38:17 -0700 |
commit | 4f1ea957bc6f0486f3b09b78ef69f5049e1e7964 (patch) | |
tree | 391d61e5fb8d2276138b9865d21579b5388f2bca | |
parent | a9288b3c53bd31a6f1e5e72880c92ab688907c55 (diff) | |
download | ansible-4f1ea957bc6f0486f3b09b78ef69f5049e1e7964.tar.gz |
[stable-2.7] Add work-around for scp issue in tests.
(cherry picked from commit 414ac12ddd785bd0a5b534d7b1571269ee8380ae)
Co-authored-by: Matt Clay <matt@mystile.com>
-rwxr-xr-x | test/integration/targets/connection_ssh/runme.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/integration/targets/connection_ssh/runme.sh b/test/integration/targets/connection_ssh/runme.sh index 18eaf87d3a..a24ff048c5 100755 --- a/test/integration/targets/connection_ssh/runme.sh +++ b/test/integration/targets/connection_ssh/runme.sh @@ -2,9 +2,22 @@ set -eux +# temporary work-around for issues due to new scp filename checking +# https://github.com/ansible/ansible/issues/52640 +if [[ "$(scp -T 2>&1)" == "usage: scp "* ]]; then + # scp supports the -T option + # work-around required + scp_args=("-e" "ansible_scp_extra_args=-T") +else + # scp does not support the -T option + # no work-around required + # however we need to put something in the array to keep older versions of bash happy + scp_args=("-e" "") +fi + # sftp ./posix.sh "$@" # scp -ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@" +ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@" "${scp_args[@]}" # piped ANSIBLE_SSH_TRANSFER_METHOD=piped ./posix.sh "$@" |