On 29.09.2016 15:03, Vikas Kumar wrote:
Hello Everyone,
How can I use Ansible expect module to say yes for this prompt.
Are you sure you want to continue (yes/no)?
I tried to use this in vain. I think Ansible does not like characters
like
these - *( , / , ) , ?*
Ansible and expect like them. But responses in expect is regexp and (, )
and ? and many more is special character,
for a full list see https://docs.python.org/2/library/re.html
- expect:
command: /my/command
responses:
Are you sure you want to continue (yes/no)?: yes
The special characters need to be escaped since you mean them literally.
Try this
Are you sure you want to continue \(yes/no\)\?: yes
--
Kai Stian Olstad
--
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/ac1daab0e6fab5aa860033d88b747944%40olstad.com.
For more options, visit https://groups.google.com/d/optout.