Setting ansible_sudo_pass in ansible.cfg?

Hi all,

is it possible to set ansible_sudo_pass in /etc/ansible/ansible.cfg to avoid having to enter the sudo pass in a group of local clients?

Thanks in advance, Simon.

Hi all,

is it possible to set ansible_sudo_pass in /etc/ansible/ansible.cfg to
avoid having to enter the sudo pass in a group of local clients?

i think you can set it in the inventory:
[all:vars]
ansible_sudo_pass=

Thanks in advance, Simon.

dario

It’s not possible in ansible.cfg, but could be set in inventory for all hosts, e.g.

For a bit more security, you might try something I outlined here:

http://serverfault.com/a/672769/274263

and here:

https://gist.github.com/mfriedenhagen/e488235d732b7becda81

It uses the python-keyring module to ask your local password safe.
Regards Mirko