Automation Scripts:Handling User Prompts (Similar to expect)

Hi:

  I would like to know how we could handle user prompts in ansible ?
I am expecting similar feature supported by "expect" or "pexpect",
where we can automate the whole process by
preconfiguring the script to handle user prompts.

Any reference link on this topic is very much appreciated.

Best,

Like to run interactive commands?

Nothing like this presently exists (outside of being able to answer the sudo prompt question) … You’d have to write a module for it, probably based on command, but more involved.

If it’s just for one specific command, a module specific to that may be good enough.