I'm wondering why the pexpect module is failing in this 
circumstance, perhaps my regex is not right, but the double ':' may be 
messing with things as well and I'm not sure how to approach handling it.


if I run-


keybase pgp encrypt -m 'secret' | keybase pgp decrypt


Then this prompt may occur, which I cant seem to catch.


Please enter your Keybase passphrase to unlock the secret key for:
PGP key andrew_graham <[email protected]> KJ2G34K4J3H1K234J 

Reason: PGP Decryption:



here is an example of my attempts with expect:


- name: Case insensitive password string match
expect:
chdir: /vagrant
command: '/bin/bash -c "echo {{ secret }} | base64 --decode | keybase pgp 
decrypt"'
responses:
.*Please enter your Keybase passphrase to unlock the secret key for \[.*\]: "{{ 
keybase_secret }}"
.*Please enter your Keybase passphrase to unlock the secret key for.*: "{{ 
keybase_secret }}"
^Reason\[:.*\] PGP Decryption\[:.*\]: "{{ keybase_secret }}"

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e6a5f169-ef38-4fe2-8198-7f4274dbc416%40googlegroups.com.

Reply via email to