re-enable non-pipelined mode for Powershell (#25012)

* fixes #23986
* fixes 3rd-party Windows connection plugins that don't support pipelining (eg awsrun)
This commit is contained in:
Matt Davis 2017-06-26 22:58:09 -07:00 committed by GitHub
commit 36ad934156
7 changed files with 128 additions and 121 deletions

View file

@ -94,14 +94,14 @@
- "raw_result.stdout_lines[0] == 'wwe=raw'"
# TODO: this test doesn't work anymore since we had to internally map Write-Host to Write-Output
#- name: run a raw command with unicode chars and quoted args (from https://github.com/ansible/ansible-modules-core/issues/1929)
# raw: Write-Host --% icacls D:\somedir\ /grant "! ЗАО. Руководство":F
# register: raw_result2
#
#- name: make sure raw passes command as-is and doesn't split/rejoin args
# assert:
# that:
# - "raw_result2.stdout_lines[0] == '--% icacls D:\\\\somedir\\\\ /grant \"! ЗАО. Руководство\":F'"
- name: run a raw command with unicode chars and quoted args (from https://github.com/ansible/ansible-modules-core/issues/1929)
raw: Write-Host --% icacls D:\somedir\ /grant "! ЗАО. Руководство":F
register: raw_result2
- name: make sure raw passes command as-is and doesn't split/rejoin args
assert:
that:
- "raw_result2.stdout_lines[0] == '--% icacls D:\\\\somedir\\\\ /grant \"! ЗАО. Руководство\":F'"
# Assumes MaxShellsPerUser == 30 (the default)
@ -116,12 +116,13 @@
- "not raw_with_items_result|failed"
- "raw_with_items_result.results|length == 32"
- name: test raw with job to ensure that preamble-free InputEncoding is working
raw: Start-Job { echo yo } | Receive-Job -Wait
register: raw_job_result
- name: check raw with job result
assert:
that:
- raw_job_result | succeeded
- raw_job_result.stdout_lines[0] == 'yo'
# TODO: this test fails, since we're back to passing raw commands without modification
#- name: test raw with job to ensure that preamble-free InputEncoding is working
# raw: Start-Job { echo yo } | Receive-Job -Wait
# register: raw_job_result
#
#- name: check raw with job result
# assert:
# that:
# - raw_job_result | succeeded
# - raw_job_result.stdout_lines[0] == 'yo'