Ansible FAILED! => {"msg": "Missing sudo password"}

I have a couple of ansible-playbook, from one of my endpoint device started to prompt missing sudo password due there is needed a sudoers access, thus this is one of the solutions.

  • login by ssh to the device, where ansible can’t login.
  • go to /etc/sudoers.d/
  • create a new entry eg: “023_user-nopass”
  • add the following line “user ALL=(ALL) NOPASSWD: ALL” into the file “023_user-nopass”
  • change the permission by using:
sudo chmod 440 023_user-nopass

NOTE: please change value for your normal user access -not the root one-

Then run again your ansible-playbook.