Files
Jordan BoreanandGitHub 51d5a456ef Fix powershell method on non-pipelined conns (#86619)
Fixes the action plugin mkdtemp and expand_user calls to fallback to the
original non-pipelined variants when a connection plugin does not
support pipelining. For example a 3rd party Windows connection plugin
may not support pipelining and thus cannot use the user _mkdtemp2 and
_expand_user2 variants exposed by the `powershell` shell plugin as they
require data to be sent over stdin.
2026-03-13 06:25:25 +10:00

25 lines
650 B
YAML

---
- name: test out Windows No Pipelining specific tests
hosts: windows
force_handlers: yes
serial: 1
gather_facts: no
tasks:
- name: get remote information for shell method tests
ansible.windows.win_powershell:
script: |
(Resolve-Path ~\).Path + "\test"
(Get-Item $env:TEMP).FullName + "\ansible-tmp-"
register: remote_info
- name: test shell methods with pipelining disabled
shell_test:
register: shell_res
- name: assert shell test results
assert:
that:
- shell_res.remote_expand_user == remote_info.output[0]
- shell_res.tmpdir.startswith(remote_info.output[1])