# expect and "Press \<Enter\> to continue."

**URL:** <https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517>\
**Category:** Ansible Project\
**Created:** [March 23, 2020, 8:48pm UTC](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517 "2020-03-23T20:48:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jost](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@Jost](https://forum.ansible.com/u/Jost)\
**Post date:** [March 23, 2020, 8:48pm UTC](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517/1 "2020-03-23T20:48:37Z")

</div>

Hi

how can I use expect module to responds to “Press to continue.” during installation of software on linux?

The questins during installations are:

Press to continue. → then show licence you have to go to the last line with enter  
If yes, enter ‘y’ to accept the license agreement. If no, enter ‘n’ to cancel the installation: y  
VVAgent is still running. Do you wish to stop it? ([Y]/n) y  
Installation directory? [/opt/BUAgent]  
Select language: [en-US]  
This will invalidate your previous registration. (y/[N]) N  
Select option (A|B) (default A) A

- name: CV upgrade  
expect:  
command: “/root/evault/Agent-Linux-x64-8.63.7483/install.sh”  
responses:  
Question:
- ‘’
- y
- y
- /opt/BUAgent
- en-US
- N
- A

in verbose mode I’m getting this:

“start”: “2020-03-23 21:40:15.642239”,  
“stdout”: “Verifying installer integrity… OK.\r\nVerifying prerequisites… OK.\r\nInstall started at 21:40:16 2020.03.23\r\n\u001b[3;J\u001b[H\u001b[2J--------------------------------------------------------------------------------\r\nBefore installing VVAgent, please read and agree to the terms\r\nand conditions of its user license.\r\n--------------------------------------------------------------------------------\r\nPress to continue.”,  
“stdout\_lines”: [  
“Verifying installer integrity… OK.”,  
“Verifying prerequisites… OK.”,  
“Install started at 21:40:16 2020.03.23”,  
“\u001b[3;J\u001b[H\u001b[2J--------------------------------------------------------------------------------”,  
“Before installing VVAgent, please read and agree to the terms”,  
“and conditions of its user license.”,  
“--------------------------------------------------------------------------------”,  
“Press to continue.”

thanks

---

<div class="post-metadata">

**Author:** ![Jost](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@Jost](https://forum.ansible.com/u/Jost)\
**Post date:** [March 27, 2020, 10:18am UTC](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517/2 "2020-03-27T10:18:55Z")

</div>

Hi

is that possible to do with ansible or no one knows?

thanks

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [March 27, 2020, 10:28am UTC](https://forum.ansible.com/t/expect-and-press-enter-to-continue/32517/3 "2020-03-27T10:28:13Z")

</div>

I think ‘Question’ is not a parameter, it’s the real question in the sample of ansible expect module

I think you could probably remove this line as you want only one answer to each question.

Regards,
