I'm trying to run a Ansible playbook from cron (hence no interaction possible) on a group of servers with sudo. Several tutorials and posts throughout the internet recommend to set the sudo password in plaintext, or set up an Ansible-Vault (which also requites an ansible-valt password file in plaintext somewhere, so no deal). Some recommend to set NOPASSWD on sudoers file to the user running the sudo commands, which I also cannot do. All those solutions present security concerns.
So I was wondering if there's a way around it? Maybe encrypt the plaintext password in a way that Ansible can decrypt and read it?
Thanks in advance!