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
- I run the programm in CLI: “loracmd -ns 127.0.0.1”
- I have no questions and no prompt sign
- 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.