I was doing some work in a remote location with a laggy connection to home. I was running ansible and kept encountering these errors:
fatal: [pg01]: FAILED! => {"failed": true, "msg": "Timeout (12s) waiting for privilege escalation prompt: "}
Rerunning the script would encounter the same error in a different part of the script.
After an error-free run I concluded it was my dodgy connection; ansible was waiting for a reply from my ssh-agent which never arrived in time.