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 <queglay@gmail.com> KJ2G34K4J3H1K234J
Reason: PGP Decryption:here is an example of my attempts with expect:
currently the expect module isn't working here. try to enter this in a shell to validate a password first. "keybase pgp encrypt -m 'secret' | keybase pgp decrypt"
TASK [deadline-spot : Case insensitive password string match] ******************
Wednesday 28 August 2019 21:51:40 +1000 (0:00:00.042) 0:00:00.726 ******
fatal: [ansible_control]: FAILED! => {
"changed": true,
"cmd": "/bin/bash -c \"echo asdfljashflakewrva23lk432h42l3nr2tlkn32rt= | base64 --decode | keybase pgp decrypt\"",
"delta": "0:00:35.439475",
"end": "2019-08-28 21:52:16.698211",
"rc": null,
"start": "2019-08-28 21:51:41.258736"
}
STDOUT:
▶ INFO Starting keybase.service.
Please enter your Keybase passphrase to unlock the secret key for:
PGP key andre
w_graham <blahblah@gmail.com> seg4esehseh
Reason: PGP Decryption:
MSG:
command exceeded timeout
