# HELP please - default 'yes' to all prompt in ansible

**URL:** <https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140>\
**Category:** Ansible Project\
**Created:** [April 4, 2017, 3:55pm UTC](https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140 "2017-04-04T15:55:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NouraD](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@NouraD](https://forum.ansible.com/u/NouraD)\
**Post date:** [April 4, 2017, 3:55pm UTC](https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140/1 "2017-04-04T15:55:58Z")

</div>

currently ansible allows only one ‘yes’ to be pushed to any question generated by config script.

I cannot run multiple ‘yes’ for the prompts generated . it get stuck after first ‘yes’

this is my task :

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [April 4, 2017, 4:30pm UTC](https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140/2 "2017-04-04T16:30:15Z")

</div>

For interactive scripts you will need to use expect module to make it work.

---

<div class="post-metadata">

**Author:** ![NouraD](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@NouraD](https://forum.ansible.com/u/NouraD)\
**Post date:** [April 4, 2017, 5:50pm UTC](https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140/3 "2017-04-04T17:50:11Z")

</div>

even if i want to bypass all the prompt? i would like it to proceed with ‘yes’ in the background without validating the answer.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [April 4, 2017, 5:56pm UTC](https://forum.ansible.com/t/help-please-default-yes-to-all-prompt-in-ansible/24140/4 "2017-04-04T17:56:51Z")

</div>

Only way to bypass the prompts is if the script support it with a command line option.  
If not, the interactive script do expect the answer at a specified time, only way to do that in Ansible or from another script would be to use expect.
