mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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:
parent
b41c42cf0d
commit
36ad934156
7 changed files with 128 additions and 121 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue