There’s no except module equivalent to Windows unfortunately but you can pass characters to the stdin piipe when running shell commands. In Ansible 2.5, the win_command and win_shell have an stdin argument which allows you to pass whatever you want to the stdin pipe of the newly created process. This allows you to pass things like “y” on a command that expects you to confirm y/n on a command. An example of this in action is
`
win_command: some_exe.exe
args:
stdin: y
`
The some_exe.exe will be run and y is sent as the input. This is rudimentary and doesn’t support things like defining different responses based on the prompt but it does give you a blanket input option if that helps.