I have in my sudoers file
ALL ALL = (ALL) NOPASSWD: ALL
Which allows anyone to use sudo without entering a password. And I confirmed that I can sudo without a password when I ssh into the machine.
Yet when I attempt to run a playbook on it, I get an error "missing sudo password".
The command I'm using to run is
ansible-playbook -i inventory.yaml common_install.yaml --limit vpn.lan.example.com -vvv
I've run the same command, limiting it to a different host, that has the same sudo rule, and are both running Ubuntu 20.04, and it works on that. But won't work on this host.
Why won't it work?
ansible -i inventory.yaml -m command -a "sudo --list" --limit vpn.lan.example.com
sudo config can be non-trivial, loading various files and even from ldap if configured, not to mention being sure to check the correct user on the correct host.