Hey,

I have a script that i want to use with ansible. This script asks questions
so I'm trying to use the expect module as below :

- name: Answer in term to the openvpn script to configure it
expect:
command: ./{{ script_name }}
responses:
IP address: '51.75.15.139'
Do you want to enable IPv6 support \(NAT\)\? \[y\/n\]: 'n'
Port choice \[1\-3\]: '1'
Protocol \[1\-2\]: '1'
DNS \[1\-10\]: '6'
Enable compression\? \[y\/n\]: 'n'
Customize encryption settings\? \[y\/n\]: 'n'
Press any key to continue\.\.\.: 'a'
become: yes

Problem is : At start it took me some times to understand escape char.
So any time I failed, ansible would timeout and tell me which questions
in the script had fail. Since then I succeed the second question and
Ansible told me prob was q.3 (as expected).
But since i had the other question (even if I had them one by one)
Ansible won't timeout but it's not working properly as it stays in this
task for ever.
Anyone would know why it doesn't timeout and also why it isn't working ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPEVEDUpFuZ0M%3DO8SS7ebVnLBswxjCK0a2WmWKcKzt5SByNEfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to