mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
win_command win_shell: add stdin option (#31619)
This commit is contained in:
@@ -178,3 +178,18 @@
|
||||
win_file:
|
||||
path: C:\ansible testing
|
||||
state: absent
|
||||
|
||||
- name: run stdin test
|
||||
win_command: powershell.exe -
|
||||
args:
|
||||
stdin: Write-Host "some input"
|
||||
register: cmdout
|
||||
|
||||
- name: assert run stdin test
|
||||
assert:
|
||||
that:
|
||||
- cmdout|changed
|
||||
- cmdout.rc == 0
|
||||
- cmdout.stdout_lines|count == 1
|
||||
- cmdout.stdout_lines[0] == "some input"
|
||||
- cmdout.stderr == ""
|
||||
|
||||
Reference in New Issue
Block a user