win_command win_shell: add stdin option (#31619)

This commit is contained in:
Jordan Borean 2017-10-23 09:50:19 +10:00 committed by GitHub
parent b663f602bc
commit 8e44cd5d10
6 changed files with 85 additions and 4 deletions

View file

@ -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'''