Ansible: Missing sudo password

So here is the another error while getting the uname of the remote boxes

$ ansible webservers -b --become-user=myuser -m shell -a 'uname -a' -u myuser
192.168.1.139 | FAILED | rc=-1 >>
Missing sudo password

After executing it with explicit become password it worked.

$ ansible webservers -b --become-user=myuser -m shell -a 'uname -a' -u myuser --extra-vars "ansible_sudo_pass=mypassword"

Leave a Comment

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

Scroll to Top