Mark,

The response questions can either be statically defined strings or regex.
The (?i) is python regex syntax for for indicating case insensitive
comparison.

The underlying library used by the expect module is pexpect.

Further information at:
https://pexpect.readthedocs.org/en/stable/api/pexpect.html#run-function
https://docs.python.org/2/library/re.html#regular-expression-syntax


On Thu, Jan 14, 2016 at 12:26 PM, Mark Constant <[email protected]>
wrote:

> The (I?) is from the example in the documentation. I meant to really put
> (?I). There really seems to be know documentation on how to properly format
> the response questions.
>
> - expect:
>     command: passwd username
>     responses:
>       (?i)password: "MySekretPa$$word"
>
>
> On Wednesday, January 13, 2016 at 12:03:49 PM UTC-5, Brian Coca wrote:
>
>> looks like you have a bad indent, this is not an expect issue but a
>> general parser one, responses should be at same level as command.
>>
>> as for install, there is no change extras is part of main ansible
>> install and does not requires separate install yet.
>>
>> not sure what (i?) is though ....
>>
>> --
>> Brian Coca
>>
> --
> 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/8dc572d3-98ce-4ce7-b5d7-64a94eb2e8fc%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8dc572d3-98ce-4ce7-b5d7-64a94eb2e8fc%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_3N6RD12cdqPKtZ6-s4yRt%2BN3fOBD5SyOU67rv%2Bi2ycA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to