User input required while running command

Hello,

I am new to ansible, and I have the following use case. The installer should be executed on the remote server. The installer itself involves some kind of wizard, where user input is required (e.g. one need to read and accept the licence).

To illustrate the use case, here is a part of my task:

  • name: Run installer
    command: chdir=/tmp ./installer.rpm.bin

Is there any way to redirect the output of this command to my local console?

Thanks,
Andrei

You can feed the command an input file by switching the “command:” to “shell:” and feeding it an input file with “< foo.txt”

Or alternatively, you could use something like expect, if so needed.