# Use Ansible expect module without question

**URL:** <https://forum.ansible.com/t/use-ansible-expect-module-without-question/25304>\
**Category:** Ansible Project\
**Created:** [August 22, 2017, 12:49pm UTC](https://forum.ansible.com/t/use-ansible-expect-module-without-question/25304 "2017-08-22T12:49:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_Giudicelli](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Charles\_Giudicelli](https://forum.ansible.com/u/Charles_Giudicelli)\
**Post date:** [August 22, 2017, 12:49pm UTC](https://forum.ansible.com/t/use-ansible-expect-module-without-question/25304/1 "2017-08-22T12:49:43Z")

</div>

Hi,

I 'd like to use the expect plugin to send commands to a configuration soft that doesn’t ask questions, but only waits for instructions.

Here is how work my prog

1. I run the programm in CLI: “loracmd -ns 127.0.0.1”
2. I have no questions and no prompt sign
3. I enter the commands:  
ns  
set allowRemoteConfiguration 1  
quit

And that’s it.

I have found some exemples, someting like this on the net.

- name: Run expect to configure lora servers  
become: yes  
expect:  
command: “loracmd -ns 127.0.0.1”  
responses:  
“.\*” :
- “ns”
- “set allowRemoteConfiguration 1”
- “quit”  
register: result  
until: result.failed is not defined  
tags:
- configuration-lora-net

But apparently somehting is not working as I have this error:  
“msg”: “No remaining responses for ‘.\*’, output was ‘’”

I am wondering as the module seems to looks for a string for question and use reg exp to find the question and answers it, maybe it’s not working for me ?

Any advices ?

Brest regards,  
Charles.
