mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
win_command win_shell: add stdin option (#31619)
This commit is contained in:
parent
b663f602bc
commit
8e44cd5d10
6 changed files with 85 additions and 4 deletions
|
@ -50,7 +50,11 @@ options:
|
|||
- a path or path filter pattern; when the referenced path B(does not) exist on the target host, the task will be skipped.
|
||||
chdir:
|
||||
description:
|
||||
- set the specified path as the current working directory before executing a command
|
||||
- set the specified path as the current working directory before executing a command.
|
||||
stdin:
|
||||
description:
|
||||
- Set the stdin of the command directly to the specified value.
|
||||
version_added: '2.5'
|
||||
notes:
|
||||
- If you want to run a command through a shell (say you are using C(<),
|
||||
C(>), C(|), etc), you actually want the M(win_shell) module instead. The
|
||||
|
@ -73,6 +77,11 @@ EXAMPLES = r'''
|
|||
args:
|
||||
chdir: C:\somedir\
|
||||
creates: C:\backup\
|
||||
|
||||
- name: Run an executable and send data to the stdin for the executable
|
||||
win_command: powershell.exe -
|
||||
args:
|
||||
stdin: Write-Host test
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue