# Ansible doesnt allows multiple promots at the same time "y\\ny\\n"

**URL:** <https://forum.ansible.com/t/ansible-doesnt-allows-multiple-promots-at-the-same-time-y-ny-n/24133>\
**Category:** Ansible Project\
**Created:** [April 3, 2017, 8:33pm UTC](https://forum.ansible.com/t/ansible-doesnt-allows-multiple-promots-at-the-same-time-y-ny-n/24133 "2017-04-03T20:33:16Z")\
**Posts on this page:** 3\
**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 3, 2017, 8:33pm UTC](https://forum.ansible.com/t/ansible-doesnt-allows-multiple-promots-at-the-same-time-y-ny-n/24133/1 "2017-04-03T20:33:16Z")

</div>

Hi ,

ansible 2.1.4.0

I am trying to use ansible module to execute a sciprt \< custom work flow\> . I have notices that ansible allows me to enter only one prompt ‘y’ from the question generated out of the custom script.

I tried to use ‘command’ or ‘expect’ modules, but also didn’t work as it expect pexpect modules .

I moved my command from a module to a bash file and asked ansible to run the file but also same issue. \< not allowing more than one promot at a time\>

any Idea how to fix this issue? what module or expression i should be using?

here is my task :

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 4, 2017, 5:53am UTC](https://forum.ansible.com/t/ansible-doesnt-allows-multiple-promots-at-the-same-time-y-ny-n/24133/2 "2017-04-04T05:53:17Z")

</div>

Have a look for vars\_prompt in the ansible documentation. This is probably the best way to make interactive scripts with ansible.

Jon

---

<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, 1:36pm UTC](https://forum.ansible.com/t/ansible-doesnt-allows-multiple-promots-at-the-same-time-y-ny-n/24133/3 "2017-04-04T13:36:18Z")

</div>

I tried adding var\_prompts on instantiate playbook, but same result . couldn’t use it as default answer for any prompts …

- hosts: “OAM”

vars\_prompt:

- default: “y”

what should i add to let Ansible push "Y’ to any prompt from thr script above?
