# Automation Scripts:Handling User Prompts (Similar to expect)

**URL:** <https://forum.ansible.com/t/automation-scripts-handling-user-prompts-similar-to-expect/11481>\
**Category:** Ansible Project\
**Created:** [May 1, 2012, 8:56pm UTC](https://forum.ansible.com/t/automation-scripts-handling-user-prompts-similar-to-expect/11481 "2012-05-01T20:56:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumar3](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@Kumar3](https://forum.ansible.com/u/Kumar3)\
**Post date:** [May 1, 2012, 8:56pm UTC](https://forum.ansible.com/t/automation-scripts-handling-user-prompts-similar-to-expect/11481/1 "2012-05-01T20:56:12Z")

</div>

Hi:

&nbsp;&nbsp;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,

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 1, 2012, 8:59pm UTC](https://forum.ansible.com/t/automation-scripts-handling-user-prompts-similar-to-expect/11481/2 "2012-05-01T20:59:13Z")

</div>

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.
