Using sudo with pam-ssh-agent-auth after sudo_flags is removed?

In my project’s “ansible.cfg” I set “sudo_flags = -H -S” to remove the “-n” option so that sudo works with pam-ssh-agent-auth (as suggested in this issue and in the docs).

When I run ansible-playbook (version 2.4.2.0) it reports the following warning:

[DEPRECATION WARNING]: DEFAULT_SUDO_FLAGS option, In favor of become which is a generic framework .
This feature will be removed in version 2.8. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.

I don’t see any “become_flags” (or similar) option, nor do I think that would be an appropriate place to change this setting as this really is a sudo-specific flag.

My question is: what I should do when 2.8 is released, is there an alternative that will allow sudo to continue to work with pam-ssh-agent-auth?

Thanks for any thoughts, -Chris

https://docs.ansible.com/ansible/2.4/config.html#default-become-flags

Thanks, that works great.

I was looking for “become_flags” in https://docs.ansible.com/ansible/2.4/intro_configuration.html where it doesn’t appear.
Is that documentation out of date?

Yes, the state of the Ansible documentation is a mess unfortunately.
Code is commited in without documentation, sometimes the documentation is added in a later commit but this commit is not merged in to all the correct branches.

I tried once to get a commit merged inn, but nothing happened so I guess documentation is low priority and the time is used on creating new stuff, hopefully with documentation :slight_smile:

So the best thing is to use the latest documentation called devel since that more updated and relevant.

An there you see intro_configuration is quite different
https://docs.ansible.com/ansible/devel/intro_configuration.html