Ansible and pam-ssh-agent-auth

When using ansible 2.0 with pam-ssh-agent-auth, I got this error:

sudo: a password is required

I eventually tracked down this, and the fix was to add the following to my ansible.cfg file:


[defaults]
sudo_flags=-H -S

Hopefully this saves somebody else the trouble…

3 thoughts on “Ansible and pam-ssh-agent-auth”

  1. Yes, that tip DID save me a lot of time debugging why our automation was failing, but only against local VMWare Fusion development VMs, after upgrading to Ansible 2.

    Thanks!

  2. After made above changes now I am getting below mentioned error can you please advise me on that
    error:-
    fatal: [172.18.21.116]: FAILED! => {“failed”: true, “msg”: “Timeout (12s) waiting for privilege escalation prompt: “}

Leave a Reply

Your email address will not be published. Required fields are marked *