Id recommend just starting off with using `Enter: "{{ passphrase}}"

The (?i) indicates a case insensitive search, and the parents around ^ are
unnecessary, and the can be problematic as sometimes expect sees a \n or a
space as the first char.

On Thursday, January 21, 2016, Byron Kim <[email protected]> wrote:

> I can't seem to find much documentation or uses of this module.  I tried
> reading up on pexpect documentation however, i'm unable to find my answer.
>
> I'm having ansible run a script and then there are prompts that need to be
> answered.
>
> - name: GENERATE CERTIFICATE AND KEY
>   expect:
>     command: /home/user/script arg1
>     chdir: /home/user/
>     responses:
>       (^)(?i)Enter: '{{ passphrase }}'
>       (^)(?i)Verifying: '{{ passphrase }}'
>       (^)(?i)Common: '{{ common_name }}'
>
> When the ./script runs, it has a series of text and the prompt finishes
> with:
>
> 'Enter PEM pass phrase:'
>
> is the `(^)(?i)` the correct regex I would be using to match the text
> 'Enter'?
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8d042724-c9d9-4a9c-b229-543c17ce91ff%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8d042724-c9d9-4a9c-b229-543c17ce91ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v-VmA_9f_%2Bj6SbLz9nm8fDs%2BUC-Fiku2z-MgtZCiMbQzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to